Title: [106785] trunk/LayoutTests
Revision
106785
Author
[email protected]
Date
2012-02-06 01:22:26 -0800 (Mon, 06 Feb 2012)

Log Message

Layout Test http/tests/security/xssAuditor/dom-write-innerHTML.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=67538

Reviewed by Kentaro Hara.

Try to fix the flakiness in this test by kicking off the <img> load
before the load event has fired for the inner frame.  That way, the
load event for the main frame will be delayed until the image finishes
loading (and its error handler has fired), removing the need for the
setTimeout.

* http/tests/security/xssAuditor/dom-write-innerHTML.html:
* http/tests/security/xssAuditor/resources/echo-dom-write-innerHTML.html:
* platform/chromium/test_expectations.txt:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (106784 => 106785)


--- trunk/LayoutTests/ChangeLog	2012-02-06 09:07:20 UTC (rev 106784)
+++ trunk/LayoutTests/ChangeLog	2012-02-06 09:22:26 UTC (rev 106785)
@@ -1,3 +1,20 @@
+2012-02-06  Adam Barth  <[email protected]>
+
+        Layout Test http/tests/security/xssAuditor/dom-write-innerHTML.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=67538
+
+        Reviewed by Kentaro Hara.
+
+        Try to fix the flakiness in this test by kicking off the <img> load
+        before the load event has fired for the inner frame.  That way, the
+        load event for the main frame will be delayed until the image finishes
+        loading (and its error handler has fired), removing the need for the
+        setTimeout.
+
+        * http/tests/security/xssAuditor/dom-write-innerHTML.html:
+        * http/tests/security/xssAuditor/resources/echo-dom-write-innerHTML.html:
+        * platform/chromium/test_expectations.txt:
+
 2012-02-05  Adam Barth  <[email protected]>
 
         xss-DENIED-from-data-url-in-foreign-domain-subframe.html is flaky

Modified: trunk/LayoutTests/http/tests/security/xssAuditor/dom-write-innerHTML.html (106784 => 106785)


--- trunk/LayoutTests/http/tests/security/xssAuditor/dom-write-innerHTML.html	2012-02-06 09:07:20 UTC (rev 106784)
+++ trunk/LayoutTests/http/tests/security/xssAuditor/dom-write-innerHTML.html	2012-02-06 09:22:26 UTC (rev 106785)
@@ -9,9 +9,9 @@
 }
 
 window._onload_ = function() {
-    // Give the img onerror handler a chance to fire.
-    setTimeout("layoutTestController.notifyDone()", 100);
-}
+    if (window.layoutTestController)
+        layoutTestController.notifyDone();
+};
 </script>
 </head>
 <body>

Modified: trunk/LayoutTests/http/tests/security/xssAuditor/resources/echo-dom-write-innerHTML.html (106784 => 106785)


--- trunk/LayoutTests/http/tests/security/xssAuditor/resources/echo-dom-write-innerHTML.html	2012-02-06 09:07:20 UTC (rev 106784)
+++ trunk/LayoutTests/http/tests/security/xssAuditor/resources/echo-dom-write-innerHTML.html	2012-02-06 09:22:26 UTC (rev 106785)
@@ -1,8 +1,8 @@
 <!DOCTYPE html>
 <html>
-<head>
-<script>window._onload_ = function () {document.body.innerHTML = unescape(window.location);}</script>
-</head>
 <body>
+<script>
+document.body.innerHTML = unescape(window.location);
+</script>
 </body>
-</html>
\ No newline at end of file
+</html>

Modified: trunk/LayoutTests/platform/chromium/test_expectations.txt (106784 => 106785)


--- trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-02-06 09:07:20 UTC (rev 106784)
+++ trunk/LayoutTests/platform/chromium/test_expectations.txt	2012-02-06 09:22:26 UTC (rev 106785)
@@ -778,14 +778,14 @@
 BUGCR42044 WIN : http/tests/security/xss-DENIED-mime-type-execute-as-html.html = PASS TIMEOUT
 BUGWK42769 : http/tests/security/401-logout/401-logout.php = TIMEOUT
 BUGDPRANKE WIN : http/tests/security/credentials-in-referer.html = PASS TIMEOUT
-BUGCR54348 LINUX RELEASE : http/tests/security/xssAuditor/dom-write-innerHTML.html = PASS TEXT
-BUGWK67538 DEBUG : http/tests/security/xssAuditor/dom-write-innerHTML.html = PASS TEXT
 BUG_LEVIN DEBUG : http/tests/security/mixedContent/insecure-image-in-main-frame.html = PASS TEXT
 BUGWK70298 : http/tests/security/xssAuditor/cookie-injection.html = TEXT PASS
 BUGCR24182 WIN RELEASE : http/tests/security/cross-origin-css.html = PASS TIMEOUT
 
 // Hopefully fixed flakiness (need to verify with dashboard).
 BUGCR9798 RELEASE : http/tests/security/dataURL/xss-DENIED-from-data-url-in-foreign-domain-subframe.html = PASS TIMEOUT
+BUGCR54348 LINUX RELEASE : http/tests/security/xssAuditor/dom-write-innerHTML.html = PASS TEXT
+BUGWK67538 DEBUG : http/tests/security/xssAuditor/dom-write-innerHTML.html = PASS TEXT
 
 // -----------------------------------------------------------------
 // Plugin tests
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to