Title: [231861] trunk/LayoutTests
Revision
231861
Author
you...@apple.com
Date
2018-05-16 12:11:54 -0700 (Wed, 16 May 2018)

Log Message

REGRESSION (r229735): LayoutTest http/wpt/service-workers/third-party-registration.html is a flaky timeout
https://bugs.webkit.org/show_bug.cgi?id=183860
<rdar://problem/38975251>

Reviewed by Geoffrey Garen.

Make test more robust by introducing a timeout and better failure reporting.
Mark test as Pass/Fail to start gathering results on test stability.

* http/wpt/service-workers/resources/third-party-registration-frame.html:
* platform/ios-wk2/TestExpectations:
* platform/mac-wk2/TestExpectations:

Modified Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (231860 => 231861)


--- trunk/LayoutTests/ChangeLog	2018-05-16 19:06:01 UTC (rev 231860)
+++ trunk/LayoutTests/ChangeLog	2018-05-16 19:11:54 UTC (rev 231861)
@@ -1,3 +1,18 @@
+2018-05-16  Youenn Fablet  <you...@apple.com>
+
+        REGRESSION (r229735): LayoutTest http/wpt/service-workers/third-party-registration.html is a flaky timeout
+        https://bugs.webkit.org/show_bug.cgi?id=183860
+        <rdar://problem/38975251>
+
+        Reviewed by Geoffrey Garen.
+
+        Make test more robust by introducing a timeout and better failure reporting.
+        Mark test as Pass/Fail to start gathering results on test stability.
+
+        * http/wpt/service-workers/resources/third-party-registration-frame.html:
+        * platform/ios-wk2/TestExpectations:
+        * platform/mac-wk2/TestExpectations:
+
 2018-05-16  David Fenton  <david_fen...@apple.com>
 
         Mark LayoutTest animations/needs-layout.html as Flaky on macOS debug.

Modified: trunk/LayoutTests/http/wpt/service-workers/resources/third-party-registration-frame.html (231860 => 231861)


--- trunk/LayoutTests/http/wpt/service-workers/resources/third-party-registration-frame.html	2018-05-16 19:06:01 UTC (rev 231860)
+++ trunk/LayoutTests/http/wpt/service-workers/resources/third-party-registration-frame.html	2018-05-16 19:11:54 UTC (rev 231861)
@@ -15,19 +15,24 @@
     if (activeWorker)
         return;
     activeWorker = registration.installing;
-    await new Promise(resolve => {
+    await new Promise((resolve, reject) => {
         activeWorker.addEventListener('statechange', () => {
             if (activeWorker.state === "activated")
                 resolve();
         });
+        setTimeout(reject, 5000);
     });
 }
 window._onmessage_ = async (e) => {
-    await doTest();
-    navigator.serviceWorker._onmessage_ = (e) => {
-        parent.postMessage(e.data, '*');
+    try {
+        await doTest();
+        navigator.serviceWorker._onmessage_ = (e) => {
+            parent.postMessage(e.data, '*');
+        }
+        activeWorker.postMessage(e.data);
+    } catch (e) {
+        parent.postMessage("FAILED: " + e, '*');
     }
-    activeWorker.postMessage(e.data);
 }
 </script>
 </body>

Modified: trunk/LayoutTests/http/wpt/service-workers/resources/third-party-worker.js (231860 => 231861)


--- trunk/LayoutTests/http/wpt/service-workers/resources/third-party-worker.js	2018-05-16 19:06:01 UTC (rev 231860)
+++ trunk/LayoutTests/http/wpt/service-workers/resources/third-party-worker.js	2018-05-16 19:11:54 UTC (rev 231861)
@@ -2,22 +2,26 @@
     await self.clients.claim();
 });
 addEventListener('message', async (e) => {
-    if (e.data ="" 'write') {
-        await writeDB();
-        await self.caches.open(e.data);
-        e.source.postMessage('written');
-        return;
+    try {
+        if (e.data ="" 'write') {
+            await writeDB();
+            await self.caches.open(e.data);
+            e.source.postMessage('written');
+            return;
+        }
+        if (e.data ="" 'read') {
+            var keys = await self.caches.keys();
+            var db = await readDB();
+            if (!db)
+                db = null;
+            var result = { cache : keys, db : db };
+            e.source.postMessage(JSON.stringify(result));
+            return;
+        }
+        e.source.postMessage('error');
+    } catch (e) {
+        e.source.postMessage('Got error:' + e);
     }
-    if (e.data ="" 'read') {
-        var keys = await self.caches.keys();
-        var db = await readDB();
-        if (!db)
-            db = null;
-        var result = { cache : keys, db : db };
-        e.source.postMessage(JSON.stringify(result));
-        return;
-    }
-    e.source.postMessage('error');
 });
 
 function readDB() {

Modified: trunk/LayoutTests/platform/ios-wk2/TestExpectations (231860 => 231861)


--- trunk/LayoutTests/platform/ios-wk2/TestExpectations	2018-05-16 19:06:01 UTC (rev 231860)
+++ trunk/LayoutTests/platform/ios-wk2/TestExpectations	2018-05-16 19:11:54 UTC (rev 231861)
@@ -1348,7 +1348,7 @@
 
 webkit.org/b/183714 [ Debug ] http/tests/storageAccess/grant-storage-access-under-opener.html [ Skip ]
 
-webkit.org/b/183860 [ Release ] http/wpt/service-workers/third-party-registration.html [ Skip ]
+webkit.org/b/183860 [ Release ] http/wpt/service-workers/third-party-registration.html [ Pass Failure ]
 
 webkit.org/b/184245 http/tests/workers/service/service-worker-cache-api.https.html [ Pass Failure ]
 

Modified: trunk/LayoutTests/platform/mac-wk2/TestExpectations (231860 => 231861)


--- trunk/LayoutTests/platform/mac-wk2/TestExpectations	2018-05-16 19:06:01 UTC (rev 231860)
+++ trunk/LayoutTests/platform/mac-wk2/TestExpectations	2018-05-16 19:11:54 UTC (rev 231861)
@@ -879,7 +879,7 @@
 
 webkit.org/b/183879 [ Debug ] fast/scrolling/latching/scroll-div-no-latching.html [ Pass Failure ]
 
-webkit.org/b/183860 [ Sierra Release ] http/wpt/service-workers/third-party-registration.html [ Skip ]
+webkit.org/b/183860 [ Sierra Release ] http/wpt/service-workers/third-party-registration.html [ Pass Failure ]
 
 webkit.org/b/184245 http/tests/workers/service/service-worker-cache-api.https.html [ Pass Failure ]
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to