[SCM] WebKit Debian packaging branch, debian/experimental, updated. upstream/1.3.3-9427-gc2be6fc

aestes at apple.com aestes at apple.com
Wed Dec 22 12:43:27 UTC 2010


The following commit has been merged in the debian/experimental branch:
commit 1c0d3a71608be57a780cca69a14b91c25b90d332
Author: aestes at apple.com <aestes at apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Date:   Fri Aug 27 21:11:22 2010 +0000

    Try to make some xssAuditor tests less flakey.
    https://bugs.webkit.org/show_bug.cgi?id=44749
    
    Reviewed by Simon Fraser.
    
    Use postMessage() to communicate to the top window each time a
    beforeload event fires in the iframe. When the top window has seen a
    beforeload event from each widget in the iframe, it calls notifyDone().
    This prevents the test from exiting before all the widgets have had a
    chance to load, therefore ensuring that all relevant XSS Auditor
    messages have been emitted.
    
    * http/tests/security/xssAuditor/object-embed-tag-control-char-expected.txt:
    * http/tests/security/xssAuditor/object-embed-tag-control-char.html:
    * http/tests/security/xssAuditor/object-embed-tag-expected.txt:
    * http/tests/security/xssAuditor/object-embed-tag-null-char-expected.txt:
    * http/tests/security/xssAuditor/object-embed-tag-null-char.html:
    * http/tests/security/xssAuditor/object-embed-tag.html:
    * http/tests/security/xssAuditor/object-src-inject.html:
    * http/tests/security/xssAuditor/object-tag-javascript-url.html:
    * http/tests/security/xssAuditor/object-tag.html:
    * http/tests/security/xssAuditor/resources/echo-intertag.pl:
    * http/tests/security/xssAuditor/resources/echo-object-src.pl:
    * http/tests/security/xssAuditor/resources/utilities.js:
    (notifyDoneAfterReceivingBeforeloadFromIds):
    * platform/mac/Skipped:
    
    
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@66254 268f45cc-cd09-0410-ab3c-d52691b4dbfc

diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog
index daee908..5b6a192 100644
--- a/LayoutTests/ChangeLog
+++ b/LayoutTests/ChangeLog
@@ -1,3 +1,32 @@
+2010-08-27  Andy Estes  <aestes at apple.com>
+
+        Reviewed by Simon Fraser.
+
+        Try to make some xssAuditor tests less flakey.
+        https://bugs.webkit.org/show_bug.cgi?id=44749
+        
+        Use postMessage() to communicate to the top window each time a
+        beforeload event fires in the iframe. When the top window has seen a
+        beforeload event from each widget in the iframe, it calls notifyDone().
+        This prevents the test from exiting before all the widgets have had a
+        chance to load, therefore ensuring that all relevant XSS Auditor
+        messages have been emitted.
+
+        * http/tests/security/xssAuditor/object-embed-tag-control-char-expected.txt:
+        * http/tests/security/xssAuditor/object-embed-tag-control-char.html:
+        * http/tests/security/xssAuditor/object-embed-tag-expected.txt:
+        * http/tests/security/xssAuditor/object-embed-tag-null-char-expected.txt:
+        * http/tests/security/xssAuditor/object-embed-tag-null-char.html:
+        * http/tests/security/xssAuditor/object-embed-tag.html:
+        * http/tests/security/xssAuditor/object-src-inject.html:
+        * http/tests/security/xssAuditor/object-tag-javascript-url.html:
+        * http/tests/security/xssAuditor/object-tag.html:
+        * http/tests/security/xssAuditor/resources/echo-intertag.pl:
+        * http/tests/security/xssAuditor/resources/echo-object-src.pl:
+        * http/tests/security/xssAuditor/resources/utilities.js:
+        (notifyDoneAfterReceivingBeforeloadFromIds):
+        * platform/mac/Skipped:
+
 2010-08-09  Jer Noble  <jer.noble at apple.com>
 
         Add JavaScript API to allow a page to go fullscreen.
diff --git a/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-control-char-expected.txt b/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-control-char-expected.txt
index 0be2156..0b106c4 100644
--- a/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-control-char-expected.txt
+++ b/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-control-char-expected.txt
@@ -1,3 +1,5 @@
 CONSOLE MESSAGE: line 1: Refused to load an object. URL found within request: "http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf".
 
+CONSOLE MESSAGE: line 1: Refused to load an object. URL found within request: "http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf".
+
 
diff --git a/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-control-char.html b/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-control-char.html
index 9a5a62a..cb75f07 100644
--- a/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-control-char.html
+++ b/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-control-char.html
@@ -1,15 +1,18 @@
 <!DOCTYPE html>
 <html>
 <head>
+<script src='resources/utilities.js'></script>
 <script>
 if (window.layoutTestController) {
   layoutTestController.dumpAsText();
   layoutTestController.setXSSAuditorEnabled(true);
+  layoutTestController.waitUntilDone();
+  notifyDoneAfterReceivingBeforeloadFromIds(["object", "embed"]);
 }
 </script>
 </head>
 <body>
-<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?q=<object name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05' /><embed name='plugin' type='application/x-webkit-test-netscape' src='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05' /></object>">
+<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?relay-target-ids-for-event=beforeload&q=<object id='object' name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05' /><embed id='embed' name='plugin' type='application/x-webkit-test-netscape' src='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf%05' /></object>">
 </iframe>
 </body>
 </html>
diff --git a/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-expected.txt b/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-expected.txt
index 0be2156..0b106c4 100644
--- a/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-expected.txt
+++ b/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-expected.txt
@@ -1,3 +1,5 @@
 CONSOLE MESSAGE: line 1: Refused to load an object. URL found within request: "http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf".
 
+CONSOLE MESSAGE: line 1: Refused to load an object. URL found within request: "http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf".
+
 
diff --git a/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-null-char-expected.txt b/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-null-char-expected.txt
index f1c571a..a022a8c 100644
--- a/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-null-char-expected.txt
+++ b/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-null-char-expected.txt
@@ -1,3 +1,5 @@
 CONSOLE MESSAGE: line 1: Refused to load an object. URL found within request: "http://127.0.0.1:8000/sec�urity/xssAuditor/resources/dummy.swf".
 
+CONSOLE MESSAGE: line 1: Refused to load an object. URL found within request: "http://127.0.0.1:8000/sec�urity/xssAuditor/resources/dummy.swf".
+
 
diff --git a/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-null-char.html b/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-null-char.html
index bb45648..a1e854d 100644
--- a/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-null-char.html
+++ b/LayoutTests/http/tests/security/xssAuditor/object-embed-tag-null-char.html
@@ -1,15 +1,18 @@
 <!DOCTYPE html>
 <html>
 <head>
+<script src="resources/utilities.js"></script>
 <script>
 if (window.layoutTestController) {
   layoutTestController.dumpAsText();
   layoutTestController.setXSSAuditorEnabled(true);
+  layoutTestController.waitUntilDone();
+  notifyDoneAfterReceivingBeforeloadFromIds(["object", "embed"]);
 }
 </script>
 </head>
 <body>
-<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?q=<object name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf' /><embed name='plugin' type='application/x-webkit-test-netscape' src='http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf' /></object>">
+<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?relay-target-ids-for-event=beforeload&q=<object id='object' name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf' /><embed id='embed' name='plugin' type='application/x-webkit-test-netscape' src='http://127.0.0.1:8000/sec%00urity/xssAuditor/resources/dummy.swf' /></object>">
 </iframe>
 </body>
 </html>
diff --git a/LayoutTests/http/tests/security/xssAuditor/object-embed-tag.html b/LayoutTests/http/tests/security/xssAuditor/object-embed-tag.html
index e15d8f9..f8ff499 100644
--- a/LayoutTests/http/tests/security/xssAuditor/object-embed-tag.html
+++ b/LayoutTests/http/tests/security/xssAuditor/object-embed-tag.html
@@ -1,15 +1,18 @@
 <!DOCTYPE html>
 <html>
 <head>
+<script src="resources/utilities.js"></script>
 <script>
 if (window.layoutTestController) {
   layoutTestController.dumpAsText();
   layoutTestController.setXSSAuditorEnabled(true);
+  layoutTestController.waitUntilDone();
+  notifyDoneAfterReceivingBeforeloadFromIds(["object", "embed"]);
 }
 </script>
 </head>
 <body>
-<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?q=<object name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf' /><embed name='plugin' type='application/x-webkit-test-netscape' src='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf' /></object>">
+<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?relay-target-ids-for-event=beforeload&q=<object id='object' name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf' /><embed id='embed' name='plugin' type='application/x-webkit-test-netscape' src='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf' /></object>">
 </iframe>
 </body>
 </html>
diff --git a/LayoutTests/http/tests/security/xssAuditor/object-src-inject.html b/LayoutTests/http/tests/security/xssAuditor/object-src-inject.html
index 769037a..79783eb 100644
--- a/LayoutTests/http/tests/security/xssAuditor/object-src-inject.html
+++ b/LayoutTests/http/tests/security/xssAuditor/object-src-inject.html
@@ -1,15 +1,18 @@
 <!DOCTYPE html>
 <html>
 <head>
+<script src="resources/utilities.js"></script>
 <script>
 if (window.layoutTestController) {
   layoutTestController.dumpAsText();
   layoutTestController.setXSSAuditorEnabled(true);
+  layoutTestController.waitUntilDone();
+  notifyDoneAfterReceivingBeforeloadFromIds(["object"]);
 }
 </script>
 </head>
 <body>
-<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-object-src.pl?q=http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf">
+<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-object-src.pl?relay-target-ids-for-event=beforeload&q=http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf">
 </iframe>
 </body>
 </html>
diff --git a/LayoutTests/http/tests/security/xssAuditor/object-tag-javascript-url.html b/LayoutTests/http/tests/security/xssAuditor/object-tag-javascript-url.html
index 399566a..530e132 100644
--- a/LayoutTests/http/tests/security/xssAuditor/object-tag-javascript-url.html
+++ b/LayoutTests/http/tests/security/xssAuditor/object-tag-javascript-url.html
@@ -1,15 +1,18 @@
 <!DOCTYPE html>
 <html>
 <head>
+<script src="resources/utilities.js"></script>
 <script>
 if (window.layoutTestController) {
   layoutTestController.dumpAsText();
   layoutTestController.setXSSAuditorEnabled(true);
+  layoutTestController.waitUntilDone();
+  notifyDoneAfterReceivingBeforeloadFromIds(["object"]);
 }
 </script>
 </head>
 <body>
-<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?q=<object data='javascript:alert(document.domain)'></object>">
+<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?relay-target-ids-for-event=beforeload&q=<object id='object' data='javascript:alert(document.domain)'></object>">
 </iframe>
 </body>
 </html>
diff --git a/LayoutTests/http/tests/security/xssAuditor/object-tag.html b/LayoutTests/http/tests/security/xssAuditor/object-tag.html
index 63c48dc..5f74785 100644
--- a/LayoutTests/http/tests/security/xssAuditor/object-tag.html
+++ b/LayoutTests/http/tests/security/xssAuditor/object-tag.html
@@ -1,15 +1,18 @@
 <!DOCTYPE html>
 <html>
 <head>
+<script src="resources/utilities.js"></script>
 <script>
 if (window.layoutTestController) {
   layoutTestController.dumpAsText();
   layoutTestController.setXSSAuditorEnabled(true);
+  layoutTestController.waitUntilDone();
+  notifyDoneAfterReceivingBeforeloadFromIds(["object"]);
 }
 </script>
 </head>
 <body>
-<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?q=<object name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf' /></object>">
+<iframe src="http://localhost:8000/security/xssAuditor/resources/echo-intertag.pl?relay-target-ids-for-event=beforeload&q=<object id='object' name='plugin' type='application/x-webkit-test-netscape'><param name='movie' value='http://127.0.0.1:8000/security/xssAuditor/resources/dummy.swf' /></object>">
 </iframe>
 </body>
 </html>
diff --git a/LayoutTests/http/tests/security/xssAuditor/resources/echo-intertag.pl b/LayoutTests/http/tests/security/xssAuditor/resources/echo-intertag.pl
index ef8e2f6..7f43019 100755
--- a/LayoutTests/http/tests/security/xssAuditor/resources/echo-intertag.pl
+++ b/LayoutTests/http/tests/security/xssAuditor/resources/echo-intertag.pl
@@ -20,6 +20,13 @@ print "Content-Type: text/html; charset=UTF-8\n\n";
 
 print "<!DOCTYPE html>\n";
 print "<html>\n";
+if ($cgi->param('relay-target-ids-for-event')) {
+    print "<script>\n";
+    print "document.addEventListener('" . $cgi->param('relay-target-ids-for-event') . "', function(event) {\n";
+    print "    window.parent.postMessage(event.target.id, '*');\n";
+    print "}, true);\n";
+    print "</script>\n";
+}
 print "<body>\n";
 print $cgi->param('q');
 if ($cgi->param('notifyDone')) {
diff --git a/LayoutTests/http/tests/security/xssAuditor/resources/echo-object-src.pl b/LayoutTests/http/tests/security/xssAuditor/resources/echo-object-src.pl
index 6c98958..23900f3 100755
--- a/LayoutTests/http/tests/security/xssAuditor/resources/echo-object-src.pl
+++ b/LayoutTests/http/tests/security/xssAuditor/resources/echo-object-src.pl
@@ -8,7 +8,15 @@ print "Content-Type: text/html; charset=UTF-8\n\n";
 
 print "<!DOCTYPE html>\n";
 print "<html>\n";
-print "<object name=\"plugin\" type=\"application/x-webkit-test-netscape\">\n";
+if ($cgi->param('relay-target-ids-for-event')) {
+    print "<script>\n";
+    print "document.addEventListener('" . $cgi->param('relay-target-ids-for-event') . "', function(event) {\n";
+    print "    window.parent.postMessage(event.target.id, '*');\n";
+    print "}, true);\n";
+    print "</script>\n";
+}
+print "<body>\n";
+print "<object id=\"object\" name=\"plugin\" type=\"application/x-webkit-test-netscape\">\n";
 print "<param name=\"movie\" value=\"".$cgi->param('q')."\" />\n";
 print "</object>\n";
 print "</body>\n";
diff --git a/LayoutTests/http/tests/security/xssAuditor/resources/utilities.js b/LayoutTests/http/tests/security/xssAuditor/resources/utilities.js
index d612ae1..54dc204 100644
--- a/LayoutTests/http/tests/security/xssAuditor/resources/utilities.js
+++ b/LayoutTests/http/tests/security/xssAuditor/resources/utilities.js
@@ -35,3 +35,19 @@ function sendRequestFromIFrame(url, params, HTTPMethod, callbackWhenDone)
         iFrameObj.onload = callbackWhenDone;
     frameContent.getElementById('form').submit();
 }
+
+
+function notifyDoneAfterReceivingBeforeloadFromIds(ids)
+{
+    var loadAttempted = 0;
+    window.addEventListener("message", function(event) {
+        var index = ids.indexOf(event.data);
+        if (index == -1)
+            return;
+
+        loadAttempted = loadAttempted | (1 << index);
+        if (loadAttempted == (1 << ids.length) - 1)
+            layoutTestController.notifyDone();
+    }, false);
+}
+
diff --git a/LayoutTests/platform/mac/Skipped b/LayoutTests/platform/mac/Skipped
index 6c04f2b..1766cdb 100644
--- a/LayoutTests/platform/mac/Skipped
+++ b/LayoutTests/platform/mac/Skipped
@@ -301,7 +301,3 @@ fast/canvas/webgl/gl-teximage.html
 # Test always crashes on snowleopard, crashes on reload on leopard
 fast/events/tabindex-focus-blur-all.html
 
-# https://bugs.webkit.org/show_bug.cgi?id=44749
-# Skipping flakey xssAuditor tests, until the bug is resolved.
-http/tests/security/xssAuditor/object-embed-tag-null-char.html
-http/tests/security/xssAuditor/object-src-inject.html

-- 
WebKit Debian packaging



More information about the Pkg-webkit-commits mailing list