Index: LayoutTests/http/tests/serviceworker/registration.html |
diff --git a/LayoutTests/http/tests/serviceworker/registration.html b/LayoutTests/http/tests/serviceworker/registration.html |
index 6e13e0320259a5817552efc8fc78bf2265e8510f..34821c8a84628d4742ec39a124303085b7931630 100644 |
--- a/LayoutTests/http/tests/serviceworker/registration.html |
+++ b/LayoutTests/http/tests/serviceworker/registration.html |
@@ -8,7 +8,7 @@ |
promise_test(function(t) { |
var script = 'resources/registration-worker.js'; |
- var scope = 'resources/registration/'; |
+ var scope = '/registration/'; |
return navigator.serviceWorker.register(script, {scope: scope}) |
.then(function(registration) { |
assert_true(registration instanceof ServiceWorkerRegistration, |
@@ -16,37 +16,6 @@ |
service_worker_unregister_and_done(t, scope); |
}) |
}, 'Registering normal pattern'); |
- |
-promise_test(function(t) { |
- var script = 'resources/registration-worker.js'; |
- var scope = 'resources/'; |
- return navigator.serviceWorker.register(script, {scope: scope}) |
- .then(function(registration) { |
- assert_true(registration instanceof ServiceWorkerRegistration, |
- 'Successfully registered.'); |
- service_worker_unregister_and_done(t, scope); |
- }) |
- }, 'Registering same scope as the script directory'); |
- |
-promise_test(function(t) { |
- var script = 'resources/registration-worker.js'; |
- var scope = 'resources'; |
- return assert_promise_rejects( |
- navigator.serviceWorker.register(script, {scope: scope}), |
- 'SecurityError', |
- 'Registering same scope as the script directory without the last ' + |
- 'slash should fail with SecurityError.'); |
- }, 'Registering same scope as the script directory without the last slash'); |
- |
-promise_test(function(t) { |
- var script = 'resources/registration-worker.js'; |
- var scope = 'different-directory/'; |
- return assert_promise_rejects( |
- navigator.serviceWorker.register(script, {scope: scope}), |
- 'SecurityError', |
- 'Registration scope outside the script directory should fail ' + |
- 'with SecurityError.'); |
- }, 'Registration scope outside the script directory'); |
promise_test(function(t) { |
var script = 'resources/registration-worker.js'; |
@@ -59,45 +28,40 @@ |
promise_test(function(t) { |
var script = 'http://example.com/worker.js'; |
- var scope = 'http://example.com/scope/'; |
return assert_promise_rejects( |
- navigator.serviceWorker.register(script, {scope: scope}), |
+ navigator.serviceWorker.register(script), |
'SecurityError', |
'Registration script outside domain should fail with SecurityError.'); |
}, 'Registering script outside domain'); |
promise_test(function(t) { |
- var script = 'resources/no-such-worker.js'; |
- var scope = 'resources/scope/no-such-worker'; |
+ var script = 'no-such-worker.js'; |
return assert_promise_rejects( |
- navigator.serviceWorker.register(script, {scope: scope}), |
+ navigator.serviceWorker.register(script), |
'NetworkError', |
'Registration of non-existent script should fail.'); |
}, 'Registering non-existent script'); |
promise_test(function(t) { |
var script = 'resources/invalid-chunked-encoding.php'; |
- var scope = 'resources/scope/invalid-chunked-encoding/'; |
return assert_promise_rejects( |
- navigator.serviceWorker.register(script, {scope: scope}), |
+ navigator.serviceWorker.register(script), |
'NetworkError', |
'Registration of invalid chunked encoding script should fail.'); |
}, 'Registering invalid chunked encoding script'); |
promise_test(function(t) { |
var script = 'resources/invalid-chunked-encoding-with-flush.php'; |
- var scope = 'resources/scope/invalid-chunked-encoding-with-flush/'; |
return assert_promise_rejects( |
- navigator.serviceWorker.register(script, {scope: scope}), |
+ navigator.serviceWorker.register(script), |
'NetworkError', |
'Registration of invalid chunked encoding script should fail.'); |
}, 'Registering invalid chunked encoding script with flush'); |
promise_test(function(t) { |
var script = 'resources/plain-text-worker.php'; |
- var scope = 'resources/scope/plain-text-worker/'; |
return assert_promise_rejects( |
- navigator.serviceWorker.register(script, {scope: scope}), |
+ navigator.serviceWorker.register(script), |
'SecurityError', |
'Registration of plain text script should fail.'); |
}, 'Registering script without correct MIME type'); |
@@ -105,9 +69,8 @@ |
promise_test(function(t) { |
var script = 'resources/redirect.php?Redirect=' + |
encodeURIComponent('/resources/registration-worker.js'); |
- var scope = 'resources/sope/redirect/'; |
return assert_promise_rejects( |
- navigator.serviceWorker.register(script, {scope: scope}), |
+ navigator.serviceWorker.register(script), |
'SecurityError', |
'Registration of redirected script should fail.'); |
}, 'Registering redirected script'); |