WebKit Bugzilla
Attachment 339355 Details for
Bug 183860
: REGRESSION (r229735): LayoutTest http/wpt/service-workers/third-party-registration.html is a flaky timeout
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-183860-20180502152009.patch (text/plain), 5.58 KB, created by
youenn fablet
on 2018-05-02 15:20:09 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
youenn fablet
Created:
2018-05-02 15:20:09 PDT
Size:
5.58 KB
patch
obsolete
>Subversion Revision: 231252 >diff --git a/LayoutTests/ChangeLog b/LayoutTests/ChangeLog >index f3606b9745a7ef82b12c08df3cf81b4a7ed8bc91..7aa0bf6b3661b29ac680c46c34c2f68b48fb8d0c 100644 >--- a/LayoutTests/ChangeLog >+++ b/LayoutTests/ChangeLog >@@ -1,3 +1,18 @@ >+2018-05-02 Youenn Fablet <youenn@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 NOBODY (OOPS!). >+ >+ 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-02 Youenn Fablet <youenn@apple.com> > > Layout Test http/wpt/service-workers/header-filtering.https.html is a flaky failure >diff --git a/LayoutTests/http/wpt/service-workers/resources/third-party-registration-frame.html b/LayoutTests/http/wpt/service-workers/resources/third-party-registration-frame.html >index 1d3dc86c1766d6be3d4e7b06059b68d6658e1eb6..c180a7a063d4c511f04db333e2f2debb9bb16628 100644 >--- a/LayoutTests/http/wpt/service-workers/resources/third-party-registration-frame.html >+++ b/LayoutTests/http/wpt/service-workers/resources/third-party-registration-frame.html >@@ -15,19 +15,24 @@ async function doTest() > 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> >diff --git a/LayoutTests/http/wpt/service-workers/resources/third-party-worker.js b/LayoutTests/http/wpt/service-workers/resources/third-party-worker.js >index a6462462d38ba6292279a0a6cd59a4cb6ba8b752..24f9e10d6ca8aa9b237b42bc5d17ec0e985b9497 100644 >--- a/LayoutTests/http/wpt/service-workers/resources/third-party-worker.js >+++ b/LayoutTests/http/wpt/service-workers/resources/third-party-worker.js >@@ -2,22 +2,26 @@ addEventListener('activate', async (e) => { > 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() { >diff --git a/LayoutTests/platform/ios-wk2/TestExpectations b/LayoutTests/platform/ios-wk2/TestExpectations >index 0010b7ec950e08f9bb09b200e7f318951ef47b36..0693e8ec8f47eb9642b7aedf4adb408c60599f0a 100644 >--- a/LayoutTests/platform/ios-wk2/TestExpectations >+++ b/LayoutTests/platform/ios-wk2/TestExpectations >@@ -1345,7 +1345,7 @@ webkit.org/b/182849 imported/w3c/web-platform-tests/XMLHttpRequest/event-upload- > > 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 ] > >diff --git a/LayoutTests/platform/mac-wk2/TestExpectations b/LayoutTests/platform/mac-wk2/TestExpectations >index 635750e4f19c9157c7eb21ab11b77ad6b4fc0226..7e81384a8f314336b2d4cff7bef349cb01cdcc3b 100644 >--- a/LayoutTests/platform/mac-wk2/TestExpectations >+++ b/LayoutTests/platform/mac-wk2/TestExpectations >@@ -879,7 +879,7 @@ webkit.org/b/183869 [ HighSierra+ ] media/modern-media-controls/seek-backward-su > > 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 ] >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 183860
:
339355
|
340706
|
340784