"Harness status: OK" + failing tests when running "serviceworkerobject-scripturl.sub.html" test

RESOLVED FIXED in Firefox 43

Status

Testing
web-platform-tests
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: noemi, Assigned: nsm)

Tracking

Trunk
mozilla43
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox42 affected, firefox43 fixed)

Details

MozReview Requests

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Reporter)

Description

3 years ago
Checked with 7/6 master build

Test run such as |./mach web-platform-tests _mozilla/service-workers/service-worker/serviceworkerobject-scripturl.sub.html|

Result:
* Harness status: OK
* Found 3 tests
* 3 Fail:
** Verify the scriptURL property: relative	
*** assert_unreached: unregister and register should not fail: The operation is insecure. Reached unreachable code
unreached_rejection/<@http://web-platform.test:8000/_mozilla/service-workers/service-worker/resources/test-helpers.sub.js:42:7 Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1363:20 Test.prototype.step_func/<@http://web-platform.test:8000/resources/testharness.js:1387:1 Promise*service_worker_unregister_and_register@http://web-platform.test:8000/_mozilla/service-workers/service-worker/resources/test-helpers.sub.js:8:10 url_test/<@http://web-platform.test:8000/_mozilla/service-workers/service-worker/serviceworkerobject-scripturl.sub.html:12:5 Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1363:20 async_test@http://web-platform.test:8000/resources/testharness.js:513:13 url_test@http://web-platform.test:8000/_mozilla/service-workers/service-worker/serviceworkerobject-scripturl.sub.html:10:1 @http://web-platform.test:8000/_mozilla/service-workers/service-worker/serviceworkerobject-scripturl.sub.html:23:1 
** Verify the scriptURL property: with-fragment	
*** assert_unreached: unregister and register should not fail: The operation is insecure. Reached unreachable code
unreached_rejection/<@http://web-platform.test:8000/_mozilla/service-workers/service-worker/resources/test-helpers.sub.js:42:7 Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1363:20 Test.prototype.step_func/<@http://web-platform.test:8000/resources/testharness.js:1387:1 Promise*service_worker_unregister_and_register@http://web-platform.test:8000/_mozilla/service-workers/service-worker/resources/test-helpers.sub.js:8:10 url_test/<@http://web-platform.test:8000/_mozilla/service-workers/service-worker/serviceworkerobject-scripturl.sub.html:12:5 Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1363:20 async_test@http://web-platform.test:8000/resources/testharness.js:513:13 url_test@http://web-platform.test:8000/_mozilla/service-workers/service-worker/serviceworkerobject-scripturl.sub.html:10:1 @http://web-platform.test:8000/_mozilla/service-workers/service-worker/serviceworkerobject-scripturl.sub.html:24:1 
** Verify the scriptURL property: absolute
*** assert_unreached: unregister and register should not fail: The operation is insecure. Reached unreachable code
unreached_rejection/<@http://web-platform.test:8000/_mozilla/service-workers/service-worker/resources/test-helpers.sub.js:42:7 Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1363:20 Test.prototype.step_func/<@http://web-platform.test:8000/resources/testharness.js:1387:1 Promise*service_worker_unregister_and_register@http://web-platform.test:8000/_mozilla/service-workers/service-worker/resources/test-helpers.sub.js:8:10 url_test/<@http://web-platform.test:8000/_mozilla/service-workers/service-worker/serviceworkerobject-scripturl.sub.html:12:5 Test.prototype.step@http://web-platform.test:8000/resources/testharness.js:1363:20 async_test@http://web-platform.test:8000/resources/testharness.js:513:13 url_test@http://web-platform.test:8000/_mozilla/service-workers/service-worker/serviceworkerobject-scripturl.sub.html:10:1 @http://web-platform.test:8000/_mozilla/service-workers/service-worker/serviceworkerobject-scripturl.sub.html:25:1 
* Traces: https://pastebin.mozilla.org/8838620
(Reporter)

Updated

3 years ago
Summary: "Harness status: OK" + failing tests when running wpt "serviceworkerobject-scripturl.sub.html" test → "Harness status: OK" + failing tests when running "serviceworkerobject-scripturl.sub.html" test
(Reporter)

Updated

3 years ago
Component: DOM: Service Workers → web-platform-tests
Product: Core → Testing
Created attachment 8655167 [details]
MozReview Request: Bug 1180754 - Get serviceworkerobject-scripturl test passing. r=bkelly

Bug 1180754 - Get serviceworkerobject-scripturl test passing. r?bkelly

This commit does several things:
1. Change to https so the test does not fail due to security exceptions.
2. Add a function service_worker_unregister_exact to get around the "getRegistration() matches most specific registration" issue.
3. Uses the URL object for the "absolute" test instead of relying on server substitution since it achieves the same thing.
4. Allows fragments in the scriptURL since I cannot find anything in the spec preventing this. I have filed https://github.com/slightlyoff/ServiceWorker/issues/742 to resolve this.

Update web-platform-tests expected data
Attachment #8655167 - Flags: review?(bkelly)
(Reporter)

Comment 2

3 years ago
Hi,

Patch provided by Nikhil so assigning this to him. Please feel free to change it as needed. Thanks!
Assignee: nobody → nsm.nikhil
Status: NEW → ASSIGNED

Comment 3

3 years ago
Comment on attachment 8655167 [details]
MozReview Request: Bug 1180754 - Get serviceworkerobject-scripturl test passing. r=bkelly

https://reviewboard.mozilla.org/r/17853/#review15989

r=me, but please try to make service_worker_unregister() exact instead of adding a new function.

::: testing/web-platform/mozilla/tests/service-workers/service-worker/resources/test-helpers.sub.js:29
(Diff revision 1)
> +function service_worker_unregister_exact(test, scope) {

Can we just make service_worker_unregister() be exact itself?  I doubt anything really depends on its matching behavior now.
Attachment #8655167 - Flags: review?(bkelly) → review+
Comment on attachment 8655167 [details]
MozReview Request: Bug 1180754 - Get serviceworkerobject-scripturl test passing. r=bkelly

Bug 1180754 - Get serviceworkerobject-scripturl test passing. r=bkelly

This commit does several things:
1. Change to https so the test does not fail due to security exceptions.
2. Add a function service_worker_unregister_exact to get around the "getRegistration() matches most specific registration" issue.
3. Uses the URL object for the "absolute" test instead of relying on server substitution since it achieves the same thing.
4. Allows fragments in the scriptURL since I cannot find anything in the spec preventing this. I have filed https://github.com/slightlyoff/ServiceWorker/issues/742 to resolve this.

Update web-platform-tests expected data
Attachment #8655167 - Attachment description: MozReview Request: Bug 1180754 - Get serviceworkerobject-scripturl test passing. r?bkelly → MozReview Request: Bug 1180754 - Get serviceworkerobject-scripturl test passing. r=bkelly
The try failures are passing locally on central from Sep 2, so trying again
https://treeherder.mozilla.org/#/jobs?repo=try&revision=b6c962be9a6e
https://treeherder.mozilla.org/#/jobs?repo=try&revision=bd6bdfdc20e3

service_worker_unregister() needs to resolve the scope to an absolute URL before it can compare against the ServiceWorkerRegistration. Trying that.
Seems like fixing the other test should lead to this being ready to land.
Depends on: 1186833
This has caused Linux W4 opt and W8 debug bustage, similar to the try failures. I also think that Web Platform Reftest failures are from this too.
Flags: needinfo?(nsm.nikhil)
This bug was found to be not the source of the W4/W8 bustage. However, because of the dependency chain from bug 1201632 and bug 1186833, I'm keeping this backed out.
Flags: needinfo?(nsm.nikhil)
https://hg.mozilla.org/mozilla-central/rev/91103a26f5e4
Status: ASSIGNED → RESOLVED
Last Resolved: 3 years ago
status-firefox43: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla43
(Reporter)

Comment 18

3 years ago
Hi,

When running |./mach web-platform-tests _mozilla/service-workers/service-worker/serviceworkerobject-scripturl.sub.html| in m-c (e7d613b3bcfe revision), no tests are run. Please find below the corresponding traces:

MacBook-Pro-de-soporte:mozilla-central noef$ ./mach web-platform-tests _mozilla/service-workers/service-worker/serviceworkerobject-scripturl.sub.html
 0:00.69 LOG: MainThread INFO Using 1 client processes
 0:01.02 LOG: MainThread wptserve INFO Starting http server on 127.0.0.1:8000
 0:01.02 LOG: MainThread wptserve INFO Starting http server on 127.0.0.1:8001
 0:01.02 LOG: MainThread wptserve INFO Starting http server on 127.0.0.1:8443
 0:02.75 SUITE_START: MainThread 0
 0:02.75 LOG: MainThread INFO Running testharness tests
 0:02.75 LOG: MainThread INFO No testharness tests to run
 0:02.75 LOG: MainThread INFO Running reftest tests
 0:02.76 LOG: MainThread INFO No reftest tests to run
 0:02.76 LOG: MainThread INFO Got 0 unexpected results
 0:02.76 SUITE_END: MainThread 
Summary
=======

Ran 0 tests
Expected results: 0
Unexpected results: 0

OK
 0:02.86 LOG: MainThread INFO Closing logging queue
 0:02.87 LOG: MainThread INFO queue closed
Flags: needinfo?(nsm.nikhil)
The test has a .https. in the filename: serviceworkerobject-scripturl.https.html
Flags: needinfo?(nsm.nikhil)
(Reporter)

Comment 20

3 years ago
(In reply to Josh Matthews [:jdm] from comment #19)
> The test has a .https. in the filename:
> serviceworkerobject-scripturl.https.html

the tests successfully run, thanks!

Summary

Harness status: OK

Found 3 tests
3 Pass
Details
Result	Test Name
Pass	Verify the scriptURL property: relative	
Pass	Verify the scriptURL property: with-fragment	
Pass	Verify the scriptURL property: absolute
You need to log in before you can comment on or make changes to this bug.