Title: [162961] trunk/LayoutTests
Revision
162961
Author
a...@apple.com
Date
2014-01-28 14:25:40 -0800 (Tue, 28 Jan 2014)

Log Message

js/dom/post-message-numeric-property.html is flaky
https://bugs.webkit.org/show_bug.cgi?id=127713

Reviewed by Geoffrey Garen.

Plain testRunner and js-test-post.js approaches to being asynchronous don't work
together, you need one or the other.

* js/dom/post-message-numeric-property-expected.txt:
* js/dom/script-tests/post-message-numeric-property.js:
Updated to use jsTestIsAsync, as the wrapper includes js-test-post.js. The results
are now always printed in correct order, not flakily.

* js/dom/cross-global-object-inline-global-var-expected.txt:
* js/dom/script-tests/cross-global-object-inline-global-var.js:
Ditto.

* js/dom/function-prototype.html:
* js/dom/parse-error-external-script-in-eval.html:
* js/dom/parse-error-external-script-in-new-Function.html:
* js/dom/parse-syntax-error-in-initializer.html:
Removed waitUntilDone, these tests are not asynchronous at all.

* js/dom/script-tests/cross-frame-bad-time.js:
* js/dom/script-tests/cross-frame-really-bad-time-with-__proto__.js:
* js/dom/script-tests/cross-frame-really-bad-time.js:
Updated to use jsTestIsAsync. These tests were not flaky because they happened to
run synchronously in practice, but document.writing a script into subframe won't
necessarily execute it synchronously in the future.

* js/resources/fs-test-post.js: Removed. This file was unused.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (162960 => 162961)


--- trunk/LayoutTests/ChangeLog	2014-01-28 22:21:47 UTC (rev 162960)
+++ trunk/LayoutTests/ChangeLog	2014-01-28 22:25:40 UTC (rev 162961)
@@ -1,3 +1,37 @@
+2014-01-28  Alexey Proskuryakov  <a...@apple.com>
+
+        js/dom/post-message-numeric-property.html is flaky
+        https://bugs.webkit.org/show_bug.cgi?id=127713
+
+        Reviewed by Geoffrey Garen.
+
+        Plain testRunner and js-test-post.js approaches to being asynchronous don't work
+        together, you need one or the other.
+
+        * js/dom/post-message-numeric-property-expected.txt:
+        * js/dom/script-tests/post-message-numeric-property.js:
+        Updated to use jsTestIsAsync, as the wrapper includes js-test-post.js. The results
+        are now always printed in correct order, not flakily.
+
+        * js/dom/cross-global-object-inline-global-var-expected.txt:
+        * js/dom/script-tests/cross-global-object-inline-global-var.js:
+        Ditto.
+
+        * js/dom/function-prototype.html:
+        * js/dom/parse-error-external-script-in-eval.html:
+        * js/dom/parse-error-external-script-in-new-Function.html:
+        * js/dom/parse-syntax-error-in-initializer.html:
+        Removed waitUntilDone, these tests are not asynchronous at all.
+
+        * js/dom/script-tests/cross-frame-bad-time.js:
+        * js/dom/script-tests/cross-frame-really-bad-time-with-__proto__.js:
+        * js/dom/script-tests/cross-frame-really-bad-time.js:
+        Updated to use jsTestIsAsync. These tests were not flaky because they happened to
+        run synchronously in practice, but document.writing a script into subframe won't
+        necessarily execute it synchronously in the future.
+
+        * js/resources/fs-test-post.js: Removed. This file was unused.
+
 2014-01-28  Viatcheslav Ostapenko  <sl.ostape...@samsung.com>
 
         Sticky positioning is broken for table rows

Modified: trunk/LayoutTests/js/dom/cross-global-object-inline-global-var-expected.txt (162960 => 162961)


--- trunk/LayoutTests/js/dom/cross-global-object-inline-global-var-expected.txt	2014-01-28 22:21:47 UTC (rev 162960)
+++ trunk/LayoutTests/js/dom/cross-global-object-inline-global-var-expected.txt	2014-01-28 22:25:40 UTC (rev 162961)
@@ -4,8 +4,8 @@
 
 
 PASS foo(3) is 324
+PASS done() called with 5770500
 PASS successfullyParsed is true
 
 TEST COMPLETE
-PASS done() called with 5770500
 

Modified: trunk/LayoutTests/js/dom/function-prototype.html (162960 => 162961)


--- trunk/LayoutTests/js/dom/function-prototype.html	2014-01-28 22:21:47 UTC (rev 162960)
+++ trunk/LayoutTests/js/dom/function-prototype.html	2014-01-28 22:25:40 UTC (rev 162961)
@@ -2,10 +2,8 @@
 <head>
 <script src=""
 <script>
-if (window.testRunner) {
-    testRunner.waitUntilDone();
+if (window.testRunner)
     testRunner.dumpAsText();
-}
 </script>
 </head>
 <body>
@@ -33,9 +31,5 @@
 shouldBe("actual", "'function () { }'");
 </script>
 <script src=""
-<script>
-if (window.testRunner)
-    testRunner.notifyDone();
-</script>
 </body>
 </html>

Modified: trunk/LayoutTests/js/dom/parse-error-external-script-in-eval.html (162960 => 162961)


--- trunk/LayoutTests/js/dom/parse-error-external-script-in-eval.html	2014-01-28 22:21:47 UTC (rev 162960)
+++ trunk/LayoutTests/js/dom/parse-error-external-script-in-eval.html	2014-01-28 22:25:40 UTC (rev 162961)
@@ -1,17 +1,10 @@
 <html>
 <head>
 <script>
-if (window.testRunner) {
+if (window.testRunner)
     testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-}
 </script>
 <script src=""
-<script>
-if (window.testRunner) {
-    testRunner.notifyDone();
-}
-</script>
 </head>
 <body>
 This tests that a line number and error message is printed for a parse error in a separate source file using eval().

Modified: trunk/LayoutTests/js/dom/parse-error-external-script-in-new-Function.html (162960 => 162961)


--- trunk/LayoutTests/js/dom/parse-error-external-script-in-new-Function.html	2014-01-28 22:21:47 UTC (rev 162960)
+++ trunk/LayoutTests/js/dom/parse-error-external-script-in-new-Function.html	2014-01-28 22:25:40 UTC (rev 162961)
@@ -1,17 +1,10 @@
 <html>
 <head>
 <script>
-if (window.testRunner) {
+if (window.testRunner)
     testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-}
 </script>
 <script src=""
-<script>
-if (window.testRunner) {
-    testRunner.notifyDone();
-}
-</script>
 </head>
 <body>
 This tests that a line number and error message is printed for a parse error in a separate source file using new Function().

Modified: trunk/LayoutTests/js/dom/parse-syntax-error-in-initializer.html (162960 => 162961)


--- trunk/LayoutTests/js/dom/parse-syntax-error-in-initializer.html	2014-01-28 22:21:47 UTC (rev 162960)
+++ trunk/LayoutTests/js/dom/parse-syntax-error-in-initializer.html	2014-01-28 22:25:40 UTC (rev 162961)
@@ -1,17 +1,10 @@
 <html>
 <head>
 <script>
-if (window.testRunner) {
+if (window.testRunner)
     testRunner.dumpAsText();
-    testRunner.waitUntilDone();
-}
 </script>
 <script src=""
-<script>
-if (window.testRunner) {
-    testRunner.notifyDone();
-}
-</script>
 </head>
 <body>
 This tests that a line number and error message is printed for a parse error in a separate source file.

Modified: trunk/LayoutTests/js/dom/post-message-numeric-property-expected.txt (162960 => 162961)


--- trunk/LayoutTests/js/dom/post-message-numeric-property-expected.txt	2014-01-28 22:21:47 UTC (rev 162960)
+++ trunk/LayoutTests/js/dom/post-message-numeric-property-expected.txt	2014-01-28 22:25:40 UTC (rev 162961)
@@ -3,8 +3,8 @@
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
+PASS e.data[0] is 'hi'
 PASS successfullyParsed is true
 
 TEST COMPLETE
-PASS e.data[0] is 'hi'
 

Modified: trunk/LayoutTests/js/dom/script-tests/cross-frame-bad-time.js (162960 => 162961)


--- trunk/LayoutTests/js/dom/script-tests/cross-frame-bad-time.js	2014-01-28 22:21:47 UTC (rev 162960)
+++ trunk/LayoutTests/js/dom/script-tests/cross-frame-bad-time.js	2014-01-28 22:25:40 UTC (rev 162961)
@@ -2,8 +2,7 @@
 "Tests that having a bad time has correct cross frame behavior."
 );
 
-if (window.testRunner)
-    testRunner.waitUntilDone();
+jsTestIsAsync = true;
 
 var ouches = 0;
 
@@ -14,8 +13,7 @@
         testPassed("Got 100 ouches.");
     else
         testFailed("Did not get 100 ouches. Got " + ouches + " instead.");
-    if (testRunner)
-        testRunner.notifyDone();
+    finishJSTest();
 }
 
 var frame = document.getElementById("myframe");

Modified: trunk/LayoutTests/js/dom/script-tests/cross-frame-really-bad-time-with-__proto__.js (162960 => 162961)


--- trunk/LayoutTests/js/dom/script-tests/cross-frame-really-bad-time-with-__proto__.js	2014-01-28 22:21:47 UTC (rev 162960)
+++ trunk/LayoutTests/js/dom/script-tests/cross-frame-really-bad-time-with-__proto__.js	2014-01-28 22:25:40 UTC (rev 162961)
@@ -2,8 +2,7 @@
 "Tests that having a bad time has correct cross frame behavior, if an instance object is created in a different global object than the affected prototype, and the prototype is assigned using __proto__."
 );
 
-if (window.testRunner)
-    testRunner.waitUntilDone();
+jsTestIsAsync = true;
 
 var ouches = 0;
 
@@ -40,8 +39,7 @@
     else
         testFailed("Did not get 5 ouches. Got " + ouches + " + instead.");
     
-    if (testRunner)
-        testRunner.notifyDone();
+    finishJSTest();
 }
 
 var frame = document.getElementById("myframe");

Modified: trunk/LayoutTests/js/dom/script-tests/cross-frame-really-bad-time.js (162960 => 162961)


--- trunk/LayoutTests/js/dom/script-tests/cross-frame-really-bad-time.js	2014-01-28 22:21:47 UTC (rev 162960)
+++ trunk/LayoutTests/js/dom/script-tests/cross-frame-really-bad-time.js	2014-01-28 22:25:40 UTC (rev 162961)
@@ -2,8 +2,7 @@
 "Tests that having a bad time has correct cross frame behavior, if an instance object is created in a different global object than the affected prototype."
 );
 
-if (window.testRunner)
-    testRunner.waitUntilDone();
+jsTestIsAsync = true;
 
 var ouches = 0;
 
@@ -41,8 +40,7 @@
     else
         testFailed("Did not get 5 ouches. Got " + ouches + " + instead.");
     
-    if (testRunner)
-        testRunner.notifyDone();
+    finishJSTest();
 }
 
 var frame = document.getElementById("myframe");

Modified: trunk/LayoutTests/js/dom/script-tests/cross-global-object-inline-global-var.js (162960 => 162961)


--- trunk/LayoutTests/js/dom/script-tests/cross-global-object-inline-global-var.js	2014-01-28 22:21:47 UTC (rev 162960)
+++ trunk/LayoutTests/js/dom/script-tests/cross-global-object-inline-global-var.js	2014-01-28 22:25:40 UTC (rev 162961)
@@ -2,8 +2,7 @@
 "This tests that function inlining in the DFG JIT doesn't get confused by different global objects."
 );
 
-if (window.testRunner)
-    testRunner.waitUntilDone();
+jsTestIsAsync = true;
 
 var b = 321;
 
@@ -19,7 +18,7 @@
         testPassed("done() called with " + expected);
     else
         testFailed("done() called with " + value + ", but expected " + expected);
-    testRunner.notifyDone();
+    finishJSTest();
 }
 
 function doit() {

Modified: trunk/LayoutTests/js/dom/script-tests/post-message-numeric-property.js (162960 => 162961)


--- trunk/LayoutTests/js/dom/script-tests/post-message-numeric-property.js	2014-01-28 22:21:47 UTC (rev 162960)
+++ trunk/LayoutTests/js/dom/script-tests/post-message-numeric-property.js	2014-01-28 22:25:40 UTC (rev 162961)
@@ -2,8 +2,7 @@
 "Tests that posting a message that consists of an object with a numeric property doesn't try to reify the property as a named property."
 );
 
-if (window.testRunner)
-    testRunner.waitUntilDone();
+jsTestIsAsync = true;
 
 window._onmessage_ = function(e) {
     var foo = e.data;
@@ -11,8 +10,7 @@
         testPassed("e.data[0] is 'hi'");
     else
         testFailed("e.data[0] is not 'hi'");
-    if (testRunner)
-        testRunner.notifyDone();
+    finishJSTest();
 }
 
 window.postMessage({0:"hi"}, "*");

Deleted: trunk/LayoutTests/js/resources/fs-test-post.js (162960 => 162961)


--- trunk/LayoutTests/js/resources/fs-test-post.js	2014-01-28 22:21:47 UTC (rev 162960)
+++ trunk/LayoutTests/js/resources/fs-test-post.js	2014-01-28 22:25:40 UTC (rev 162961)
@@ -1,6 +0,0 @@
-wasPostTestScriptParsed = true;
-
-if (window.testRunner)
-    testRunner.waitUntilDone();
-if (window.wasFinishJSTestCalled)
-    finishJSTest();
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to