Title: [156495] trunk/LayoutTests
Revision
156495
Author
[email protected]
Date
2013-09-26 14:07:27 -0700 (Thu, 26 Sep 2013)

Log Message

Layout Test plugins/access-after-page-destroyed.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=121976

Reviewed by Anders Carlsson.

Clean up the test.

* plugins/access-after-page-destroyed-2-expected.txt: Added.
* plugins/access-after-page-destroyed-2.html: Copied from LayoutTests/plugins/access-after-page-destroyed.html.
This was testing two distinct issues, the second one unfittingly piled onto the first.
Split the test in two.

* plugins/access-after-page-destroyed-expected.txt:
* plugins/access-after-page-destroyed.html:
Modernized the test with js-test scripts, added a gc() call for predictability,
changed the test to fail quickly in the flaky case.

Modified Paths

Added Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (156494 => 156495)


--- trunk/LayoutTests/ChangeLog	2013-09-26 20:59:51 UTC (rev 156494)
+++ trunk/LayoutTests/ChangeLog	2013-09-26 21:07:27 UTC (rev 156495)
@@ -1,5 +1,24 @@
 2013-09-26  Alexey Proskuryakov  <[email protected]>
 
+        Layout Test plugins/access-after-page-destroyed.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=121976
+
+        Reviewed by Anders Carlsson.
+
+        Clean up the test.
+
+        * plugins/access-after-page-destroyed-2-expected.txt: Added.
+        * plugins/access-after-page-destroyed-2.html: Copied from LayoutTests/plugins/access-after-page-destroyed.html.
+        This was testing two distinct issues, the second one unfittingly piled onto the first.
+        Split the test in two.
+
+        * plugins/access-after-page-destroyed-expected.txt:
+        * plugins/access-after-page-destroyed.html:
+        Modernized the test with js-test scripts, added a gc() call for predictability,
+        changed the test to fail quickly in the flaky case.
+
+2013-09-26  Alexey Proskuryakov  <[email protected]>
+
         fast/css/font-face-data-uri.html is failing
         https://bugs.webkit.org/show_bug.cgi?id=82744
 

Added: trunk/LayoutTests/plugins/access-after-page-destroyed-2-expected.txt (0 => 156495)


--- trunk/LayoutTests/plugins/access-after-page-destroyed-2-expected.txt	                        (rev 0)
+++ trunk/LayoutTests/plugins/access-after-page-destroyed-2-expected.txt	2013-09-26 21:07:27 UTC (rev 156495)
@@ -0,0 +1,6 @@
+If the page does not trigger a crash the test passed.
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
Property changes on: trunk/LayoutTests/plugins/access-after-page-destroyed-2-expected.txt
___________________________________________________________________

Added: svn:mime-type

Added: svn:eol-style

Copied: trunk/LayoutTests/plugins/access-after-page-destroyed-2.html (from rev 156461, trunk/LayoutTests/plugins/access-after-page-destroyed.html) (0 => 156495)


--- trunk/LayoutTests/plugins/access-after-page-destroyed-2.html	                        (rev 0)
+++ trunk/LayoutTests/plugins/access-after-page-destroyed-2.html	2013-09-26 21:07:27 UTC (rev 156495)
@@ -0,0 +1,41 @@
+<html>
+<head>
+<script src=""
+</head>
+<body>
+<p>If the page does not trigger a crash the test passed.</p>
+<div id=console></div>
+<script>
+if (window.testRunner)
+    testRunner.setCanOpenWindows();
+
+jsTestIsAsync = true;
+
+function test()
+{
+    var w = open();
+    var p = w.navigator.mimeTypes.item(0);
+    if (!p)
+        testFailed("navigator.mimeTypes is " + p);
+    w.navigator.plugins.refresh();
+    w.close();
+    w = null;
+
+    setTimeout(gc, 0);
+
+    setTimeout(function() {
+        try {
+            p.enabledPlugin;
+        } catch (ex) {
+            testFailed(ex.toString());
+        }
+        finishJSTest();
+    }, 50); // Pause is necessary for the page to get freed
+}
+
+_onload_ = test;
+
+</script>
+<script src=""
+</body>
+</html>

Modified: trunk/LayoutTests/plugins/access-after-page-destroyed-expected.txt (156494 => 156495)


--- trunk/LayoutTests/plugins/access-after-page-destroyed-expected.txt	2013-09-26 20:59:51 UTC (rev 156494)
+++ trunk/LayoutTests/plugins/access-after-page-destroyed-expected.txt	2013-09-26 21:07:27 UTC (rev 156495)
@@ -1 +1,6 @@
 If the page does not trigger a crash the test passed.
+
+PASS successfullyParsed is true
+
+TEST COMPLETE
+

Modified: trunk/LayoutTests/plugins/access-after-page-destroyed.html (156494 => 156495)


--- trunk/LayoutTests/plugins/access-after-page-destroyed.html	2013-09-26 20:59:51 UTC (rev 156494)
+++ trunk/LayoutTests/plugins/access-after-page-destroyed.html	2013-09-26 21:07:27 UTC (rev 156495)
@@ -1,30 +1,40 @@
 <html>
 <head>
+<script src=""
+</head>
+<body>
+<p>If the page does not trigger a crash the test passed.</p>
+<div id=console></div>
 <script>
-if (window.testRunner) {
+if (window.testRunner)
     testRunner.setCanOpenWindows();
-    testRunner.dumpAsText();
-    testRunner.waitUntilDone();
+
+jsTestIsAsync = true;
+
+function test()
+{
+    var w = open();
+    var p = w.navigator.mimeTypes.item(0);
+    if (!p)
+        testFailed("navigator.mimeTypes is " + p);
+    w.close();
+    w = null;
+
+    setTimeout(gc, 0);
+
+    setTimeout(function() {
+        try {
+            p.enabledPlugin;
+        } catch (ex) {
+            testFailed(ex.toString());
+        }
+        finishJSTest();
+    }, 50); // Pause is necessary for the page to get freed
 }
 
-var w = open();
-var p = w.navigator.mimeTypes.item(0);
-w.close();
-w = open();
-p = w.navigator.mimeTypes.item(0);
-w.navigator.plugins.refresh();
-w.close();
-w = null;
+_onload_ = test;
 
-setTimeout(function(){
-    p.enabledPlugin;
-    if (window.testRunner)
-        testRunner.notifyDone();
-}, 50); // Pause is necessary for the page to get freed
-
 </script>
-</head>
-<body>
-If the page does not trigger a crash the test passed.
+<script src=""
 </body>
 </html>
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to