Changeset 231861 in webkit


Ignore:
Timestamp:
May 16, 2018 12:11:54 PM (6 years ago)
Author:
youenn@apple.com
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:
Location:
trunk/LayoutTests
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r231860 r231861  
     12018-05-16  Youenn Fablet  <youenn@apple.com>
     2
     3        REGRESSION (r229735): LayoutTest http/wpt/service-workers/third-party-registration.html is a flaky timeout
     4        https://bugs.webkit.org/show_bug.cgi?id=183860
     5        <rdar://problem/38975251>
     6
     7        Reviewed by Geoffrey Garen.
     8
     9        Make test more robust by introducing a timeout and better failure reporting.
     10        Mark test as Pass/Fail to start gathering results on test stability.
     11
     12        * http/wpt/service-workers/resources/third-party-registration-frame.html:
     13        * platform/ios-wk2/TestExpectations:
     14        * platform/mac-wk2/TestExpectations:
     15
    1162018-05-16  David Fenton  <david_fenton@apple.com>
    217
  • trunk/LayoutTests/http/wpt/service-workers/resources/third-party-registration-frame.html

    r229483 r231861  
    1616        return;
    1717    activeWorker = registration.installing;
    18     await new Promise(resolve => {
     18    await new Promise((resolve, reject) => {
    1919        activeWorker.addEventListener('statechange', () => {
    2020            if (activeWorker.state === "activated")
    2121                resolve();
    2222        });
     23        setTimeout(reject, 5000);
    2324    });
    2425}
    2526window.onmessage = async (e) => {
    26     await doTest();
    27     navigator.serviceWorker.onmessage = (e) => {
    28         parent.postMessage(e.data, '*');
     27    try {
     28        await doTest();
     29        navigator.serviceWorker.onmessage = (e) => {
     30            parent.postMessage(e.data, '*');
     31        }
     32        activeWorker.postMessage(e.data);
     33    } catch (e) {
     34        parent.postMessage("FAILED: " + e, '*');
    2935    }
    30     activeWorker.postMessage(e.data);
    3136}
    3237</script>
  • trunk/LayoutTests/http/wpt/service-workers/resources/third-party-worker.js

    r229483 r231861  
    33});
    44addEventListener('message', async (e) => {
    5     if (e.data === 'write') {
    6         await writeDB();
    7         await self.caches.open(e.data);
    8         e.source.postMessage('written');
    9         return;
     5    try {
     6        if (e.data === 'write') {
     7            await writeDB();
     8            await self.caches.open(e.data);
     9            e.source.postMessage('written');
     10            return;
     11        }
     12        if (e.data === 'read') {
     13            var keys = await self.caches.keys();
     14            var db = await readDB();
     15            if (!db)
     16                db = null;
     17            var result = { cache : keys, db : db };
     18            e.source.postMessage(JSON.stringify(result));
     19            return;
     20        }
     21        e.source.postMessage('error');
     22    } catch (e) {
     23        e.source.postMessage('Got error:' + e);
    1024    }
    11     if (e.data === 'read') {
    12         var keys = await self.caches.keys();
    13         var db = await readDB();
    14         if (!db)
    15             db = null;
    16         var result = { cache : keys, db : db };
    17         e.source.postMessage(JSON.stringify(result));
    18         return;
    19     }
    20     e.source.postMessage('error');
    2125});
    2226
  • trunk/LayoutTests/platform/ios-wk2/TestExpectations

    r231714 r231861  
    13491349webkit.org/b/183714 [ Debug ] http/tests/storageAccess/grant-storage-access-under-opener.html [ Skip ]
    13501350
    1351 webkit.org/b/183860 [ Release ] http/wpt/service-workers/third-party-registration.html [ Skip ]
     1351webkit.org/b/183860 [ Release ] http/wpt/service-workers/third-party-registration.html [ Pass Failure ]
    13521352
    13531353webkit.org/b/184245 http/tests/workers/service/service-worker-cache-api.https.html [ Pass Failure ]
  • trunk/LayoutTests/platform/mac-wk2/TestExpectations

    r231388 r231861  
    880880webkit.org/b/183879 [ Debug ] fast/scrolling/latching/scroll-div-no-latching.html [ Pass Failure ]
    881881
    882 webkit.org/b/183860 [ Sierra Release ] http/wpt/service-workers/third-party-registration.html [ Skip ]
     882webkit.org/b/183860 [ Sierra Release ] http/wpt/service-workers/third-party-registration.html [ Pass Failure ]
    883883
    884884webkit.org/b/184245 http/tests/workers/service/service-worker-cache-api.https.html [ Pass Failure ]
Note: See TracChangeset for help on using the changeset viewer.