Bug 1507080 [wpt PR 14048] - service worker: Let register('data://blah') throw a TypeError, a=testonly
authorAmos Lim <eui-sang.lim@samsung.com>
Mon, 19 Nov 2018 18:45:50 +0000
changeset 506772 9fb1d44b189576a641165e28f5fb0c75b5952d20
parent 506771 65a2135472b542f302594c39593a7e8a8a52cb71
child 506773 c409ea7851c69dfa22240bc1e443afcf33468e22
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerstestonly
bugs1507080, 14048, 877138, 1189688, 608635
milestone65.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1507080 [wpt PR 14048] - service worker: Let register('data://blah') throw a TypeError, a=testonly Automatic update from web-platform-testsservice worker: Let register('data://blah') throw a TypeError register('data://blah') should throw a TypeError instead of SecurityError. If scopeURL’s scheme is not one of "http" and "https", reject promise with a TypeError and abort these steps.[1] [1]: https://w3c.github.io/ServiceWorker/#start-register-algorithm Bug: 877138 Change-Id: Ic1e8cae52ec9393152044aa37da389eb499165bb Reviewed-on: https://chromium-review.googlesource.com/c/1189688 Commit-Queue: Amos Lim <eui-sang.lim@samsung.com> Reviewed-by: Matt Falkenhagen <falken@chromium.org> Cr-Commit-Position: refs/heads/master@{#608635} -- wpt-commits: 64ee30dc4f4c7cd5016ffcfbbb6e1012b978ed66 wpt-pr: 14048
testing/web-platform/tests/service-workers/service-worker/resources/registration-tests-scope.js
testing/web-platform/tests/service-workers/service-worker/resources/registration-tests-security-error.js
--- a/testing/web-platform/tests/service-workers/service-worker/resources/registration-tests-scope.js
+++ b/testing/web-platform/tests/service-workers/service-worker/resources/registration-tests-scope.js
@@ -89,14 +89,14 @@ function registration_tests_scope(regist
             return registration.unregister();
           })
     }, 'Scope including consecutive slashes');
 
   promise_test(function(t) {
       var script = 'resources/empty-worker.js';
       var scope = 'filesystem:' + normalizeURL('resources/scope/filesystem-scope-url');
       return promise_rejects(t,
-          check_error_types ? 'SecurityError' : null,
+          check_error_types ? new TypeError : null,
           register_method(script, {scope: scope}),
           'Registering with the scope that has same-origin filesystem: URL ' +
-              'should fail with SecurityError.');
+              'should fail with TypeError.');
     }, 'Scope URL is same-origin filesystem: URL');
 }
--- a/testing/web-platform/tests/service-workers/service-worker/resources/registration-tests-security-error.js
+++ b/testing/web-platform/tests/service-workers/service-worker/resources/registration-tests-security-error.js
@@ -65,14 +65,14 @@ function registration_tests_security_err
           register_method(script, {scope: scope}),
           'Consecutive slashes in the script url should not be unified.');
     }, 'Script URL including consecutive slashes');
 
   promise_test(function(t) {
       var script = 'filesystem:' + normalizeURL('resources/empty-worker.js');
       var scope = 'resources/scope/filesystem-script-url';
       return promise_rejects(t,
-          check_error_types ? 'SecurityError' : null,
+          check_error_types ? new TypeError : null,
           register_method(script, {scope: scope}),
           'Registering a script which has same-origin filesystem: URL should ' +
-              'fail with SecurityError.');
+              'fail with TypeError.');
     }, 'Script URL is same-origin filesystem: URL');
 }