This commit does several things:
1. Change to https so the test does not fail due to security exceptions.
2. Change function service_worker_unregister to get around the "getRegistration() matches most specific registration" issue by matching exact scope.
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
--HG--
rename : testing/web-platform/mozilla/tests/service-workers/service-worker/serviceworkerobject-scripturl.sub.html => testing/web-platform/mozilla/tests/service-workers/service-worker/serviceworkerobject-scripturl.https.html
extra : commitid : FdkKoMW3YAD
extra : rebase_source : bbece1fa3fd431ef8102b5edd154387416e4eef6
extra : source : dd3fd15e5522ce319fe4f6387934e8664b14a0be
Bug 1189678 forgot to remove the ini file itself though the expectation data was updated.
--HG--
extra : commitid : BZjQyf7fuwo
extra : rebase_source : 57e2e305628b3f9624a548b83e54055e803cbcfb
extra : source : 97d3c0679108798e847e630cc8d07ea20f583e32
Update web-platform-tests expected data
--HG--
extra : commitid : 1r6fVuNoGBQ
extra : rebase_source : 88c59299e8bf31c4e5cade023fd33e2dba25890c
extra : source : abf8bb1b538a7d1172a732677b6b194bc10470b8
According to the JSON RFC [1] the official mime type is "application/json". If
we do not send this, Gecko will not fire the onload event for a frame trying to
load such a URL but will instead load an error page.
Several service worker tests rely on loading 'fake' iframes that 404 but
contribute to the progress of the test by watching for the onload event.
These tests are fixed by this patch.
[1]: http://www.ietf.org/rfc/rfc4627.txt
--HG--
extra : commitid : 1sHk7zvboJq
extra : rebase_source : 40b4891a3ba1d485e4cb82bca9a0d0cb507b8744
extra : source : 03f74eacbc7569bc6e425f0d4fd7dceaa0e3f3b3
Standard scope comparison stuff for the most part. Added <body> tag so
document.body.appendChild() in with_iframe() works. I had to add a simple 404
script because <iframe> apparently only fires the onload event if the
content-type was text/plain or text/html but our test harness delivers JSON by
default leading to timeouts.
Update web-platform-tests expected data
--HG--
extra : commitid : xsUJKRuR7r
extra : rebase_source : 1ffd68028b15304fde30d82207db168e78837a17
extra : amend_source : c06d0ab87f241904401efe88064190ce940fceb9
Added update-test.py which is a conversion of Blink update-test.php to deliver workers with different mime types.
Updated test file to latest version to check for SecurityError.
Dealt with the usual waiting/active issue.
Update web-platform-tests expected data
--HG--
extra : commitid : 9XzorHqlWDi
extra : rebase_source : a02d66beb08f4eee83f27c21a6fee1178aeea71e
This commit implements the following changes to get registration.https.html working.
1) Fail with NS_ERROR_DOM_SECURITY_ERR where the spec requires it.
2) Propagate JSExnType to ServiceWorkerManager::HandleError() so that a JS
exception object with the correct .name can be created.
3) Fail with security error on redirect failure.
4) Check fetched script's mimetype.
5) Add missing python server files for web-platform-tests.
6) Update web-platform-tests expected data.
7) Several tests have been changed to use TypeError or more appropriate JS
errors based on my reading of the spec.
--HG--
extra : commitid : IxWo2IVUweU
extra : rebase_source : c3c1ead153027bf84e7f239fd7125224fe25c3c0
Similar to other tests, the registration process allows workers to activate right after install.
Update web-platform-tests expected data
--HG--
extra : commitid : EnJ0U5Ns3cn
extra : rebase_source : 17b002ca8e1d2e166c8b09cf01f6e8b2fd98d152
waitUntil() has been updated to accept multiple calls and concatenate them into Promise.all().
activation does not fail any more even if the promise(s) passed to waitUntil() reject.
Update web-platform-tests expected data
--HG--
extra : commitid : IawOgxEfc79
extra : rebase_source : e6fcc47c873fd9f71f51a67303a6566bf0c0dd21
extra : amend_source : 787990406129722a3c58ff78782d778823daf2bf
Similar to other tests, the registration process allows workers to activate right after install.
Update web-platform-tests expected data
--HG--
extra : commitid : DpfHRFtmiSz
extra : rebase_source : 4189ef3867c15d9962628a2fa0059a354d234c3e
waitUntil() has been updated to accept multiple calls and concatenate them into Promise.all().
activation does not fail any more even if the promise(s) passed to waitUntil() reject.
Update web-platform-tests expected data
--HG--
extra : commitid : 1jnUWlyw4zQ
extra : rebase_source : 3e2ac14a2f1ebc6fbfc322bb1914feb47f261349