LayoutTest workers/sab/postMessage-clones.html is a flaky failure
authorap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Feb 2017 21:54:38 +0000 (21:54 +0000)
committerap@apple.com <ap@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 28 Feb 2017 21:54:38 +0000 (21:54 +0000)
https://bugs.webkit.org/show_bug.cgi?id=168129

Reviewed by Tim Horton.

* workers/sab/postMessage-clones-expected.txt:
* workers/sab/postMessage-clones.html:
Fix raciness, and update the test to modern style.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@213174 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/workers/sab/postMessage-clones-expected.txt
LayoutTests/workers/sab/postMessage-clones.html

index bbb17c1..657a70a 100644 (file)
@@ -1,3 +1,14 @@
+2017-02-28  Alexey Proskuryakov  <ap@apple.com>
+
+        LayoutTest workers/sab/postMessage-clones.html is a flaky failure
+        https://bugs.webkit.org/show_bug.cgi?id=168129
+
+        Reviewed by Tim Horton.
+
+        * workers/sab/postMessage-clones-expected.txt:
+        * workers/sab/postMessage-clones.html:
+        Fix raciness, and update the test to modern style.
+
 2017-02-28  Dave Hyatt  <hyatt@apple.com>
 
         Centering text inside a button set to display flex and justify-content: center is impossible
index a8a0b45..1bf5df5 100644 (file)
@@ -3,11 +3,11 @@ Checks that window.postMessage clones SharedArrayBuffers
 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
 
 
-PASS successfullyParsed is true
-
-TEST COMPLETE
 PASS memory[0] is 42
 PASS otherMemory[0] is 0
 PASS memory[0] is 42
 PASS otherMemory[0] is 43
+PASS successfullyParsed is true
+
+TEST COMPLETE
 
index 7306a75..b066035 100644 (file)
@@ -1,14 +1,13 @@
-<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<!DOCTYPE html>
 <html>
 <head>
-<script src="../../resources/js-test-pre.js"></script>
+<script src="../../resources/js-test.js"></script>
 </head>
 <body>
 <script>
 description("Checks that window.postMessage clones SharedArrayBuffers");
 
-if (window.testRunner)
-    testRunner.waitUntilDone();
+jsTestIsAsync = true;
 
 var sab = new SharedArrayBuffer(4);
 var memory = new Int32Array(sab);
@@ -22,16 +21,10 @@ window.addEventListener("message", function (event) {
     otherMemory[0] = 43;
     shouldBe("memory[0]", "42");
     shouldBe("otherMemory[0]", "43");
-    if (window.testRunner)
-        testRunner.notifyDone();
+    finishJSTest();
 });
 
-window.setTimeout(
-    function() {
-        window.postMessage(memory, "*");
-    },
-    0);
+window.postMessage(memory, "*");
 </script>
-<script src="../../resources/js-test-post.js"></script>
 </body>
 </html>