New issue
Advanced search Search tips

Issue 805225 link

Starred by 2 users

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 678905



Sign in to add a comment

Pass WPT: unregister-then-register-new-script.https.html

Project Member Reported by falken@chromium.org, Jan 24 2018

Issue description

Mozilla recently changed the expectation of the test regarding resurrection to match the spec. Apparently it was not what the spec was saying before.

From https://bugzilla.mozilla.org/show_bug.cgi?id=1425975#c20:
"This fixes a bad WPT test.  It was incorrectly trying to assert that registering a 404 or reject-on-install worker would not resurrect an uninstalling registration.  There is no such spec language, AFAICT.  See step 5.1 here:

https://w3c.github.io/ServiceWorker/#register-algorithm

It clears the flag before running the update algorithm with does the fetching and install event dispatch."

Now we fail with:
FAIL Registering a new script URL that 404s does resurrect an unregistered registration assert_unreached: unexpected rejection: Cannot read property 'scriptURL' of null Reached unreachable code
FAIL Registering a new script URL that fails to install does resurrect an unregistered registration assert_unreached: unexpected rejection: Cannot read property 'scriptURL' of null Reached unreachable code


 

Comment 1 by bke...@mozilla.com, Jan 24 2018

FWIW I also added a pointer to the relevant spec text in the test:

https://github.com/w3c/web-platform-tests/blob/master/service-workers/service-worker/unregister-then-register-new-script.https.html#L148

If this is in the spec somewhere I'd be happy to revisit it.

Comment 2 by falken@chromium.org, Jan 24 2018

Thanks Ben, I think this change was right (the test is very old and was probably written before a spec or for an old spec).
Based on the latest decision from https://github.com/w3c/ServiceWorker/issues/1204 about the behavior of resurrection, I suppose we should re-verify this case when the test case is updated. I have been investigating this issue for a couple of days, and understand some internal implementations inside the blink, so I'd like to contribute to it anytime if needed, thanks!
Cc: falken@chromium.org shimazu@chromium.org
+falken@, shimazu@
Seems we need to wait for the redefinition of the behavior when calling unregister() on a registration with an active worker that is still controlling clients, right? Then we'd fix our impl based on the new spec/tests.

Cc: leon....@intel.com
Agree, best to wait for resurrection to be removed.
I am willing to verify it when the removal is done and fix any problems.

Sign in to add a comment