Closed Bug 1493409 Opened Last year Closed Last year

[wpt-sync] Sync PR 13163 - [service-workers] Return value in cleanup

Categories

(Core :: DOM: Service Workers, enhancement, P4)

enhancement

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox64 --- fixed

People

(Reporter: wptsync, Unassigned)

References

()

Details

(Whiteboard: [wptsync downstream])

Sync web-platform-tests PR 13163 into mozilla-central (this bug is closed when the sync is complete).

PR: https://github.com/web-platform-tests/wpt/pull/13163
Details from upstream follow.

Mike Pennisi <mike@mikepennisi.com> wrote:
>  [service-workers] Return value in cleanup
>  
>  Previously, many tests un-registered service workers using the
>  testharness.js API `add_cleanup` without returning the promise which
>  tracked the operation. While this ensured the operation was started at
>  the completion of the test, it did not guarantee that the operation
>  would be completed before the test was considered "complete."
>  
>  In automation scenarios where many tests are executed in rapid
>  succession, this enabled a race condition: the navigation could
>  interrupt the un-registration process. In order to account for the
>  possibility of registrations that persisted from previous test failures,
>  the tests included "setup" code to defensively un-register such workers.
>  
>  The `Test#add_cleanup` method was recently extended to support
>  asynchronous "clean up" operations [1]. Use that API to ensure tests are
>  not considered "complete" until after service worker un-registration is
>  done.
>  
>  [1] https://github.com/web-platform-tests/wpt/pull/8748
>  
>  ---
>  
>  This patch is not intended to influence test results. To verify that, I used
>  the WPT CLI to run the affected tests in Chromium and Firefox, comparing the
>  summary it produced both on `master` and on this branch.
>  
>  Chromium on `master`:
>  
>      web-platform-test
>      ~~~~~~~~~~~~~~~~~
>      Ran 96 checks (8 tests, 88 subtests)
>      Expected results: 85
>      Unexpected results: 11
>        subtest: 11 (11 fail)
>  
>  Chromium with patch applied:
>  
>      web-platform-test
>      ~~~~~~~~~~~~~~~~~
>      Ran 96 checks (8 tests, 88 subtests)
>      Expected results: 85
>      Unexpected results: 11
>        subtest: 11 (11 fail)
>  
>  Firefox on `master`:
>  
>      web-platform-test
>      ~~~~~~~~~~~~~~~~~
>      Ran 96 checks (8 tests, 88 subtests)
>      Expected results: 88
>      Unexpected results: 8
>        subtest: 8 (8 fail)
>  
>  Firefox with patch applied:
>  
>      web-platform-test
>      ~~~~~~~~~~~~~~~~~
>      Ran 96 checks (8 tests, 88 subtests)
>      Expected results: 88
>      Unexpected results: 8
>        subtest: 8 (8 fail)
Component: web-platform-tests → DOM: Service Workers
Product: Testing → Core
Ran 8 tests and 86 subtests
OK     : 7
PASS   : 78
FAIL   : 8

Tests that are disabled for instability:
/service-workers/service-worker/skip-waiting-using-registration.https.html
Pushed by wptsync@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/014853238279
[wpt PR 13163] - [service-workers] Return value in cleanup, a=testonly
https://hg.mozilla.org/mozilla-central/rev/014853238279
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
You need to log in before you can comment on or make changes to this bug.