Chromium Code Reviews| Index: LayoutTests/http/tests/serviceworker/registration.html |
| diff --git a/LayoutTests/http/tests/serviceworker/registration.html b/LayoutTests/http/tests/serviceworker/registration.html |
| index 7219e79c3af8faa72d0e956fb8d4a2ca11fd2b27..aa2566020433db1b26883157b3578e1943e51308 100644 |
| --- a/LayoutTests/http/tests/serviceworker/registration.html |
| +++ b/LayoutTests/http/tests/serviceworker/registration.html |
| @@ -92,6 +92,15 @@ promise_test(function(t) { |
| }, 'Registering non-existent script'); |
| promise_test(function(t) { |
| + var script = 'resources/import-no-such-script.js'; |
|
falken
2014/11/04 05:47:55
We've been naming service worker scripts as "*-wor
nhiroki
2014/11/04 08:56:21
Done.
|
| + var scope = 'resources/scope/import-no-such-script'; |
| + return assert_promise_rejects( |
| + navigator.serviceWorker.register(script, {scope: scope}), |
| + 'AbortError', |
| + 'Registration of script importing non-existent script should fail.'); |
| + }, 'Registering script importing 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( |
| @@ -121,11 +130,29 @@ promise_test(function(t) { |
| promise_test(function(t) { |
| var script = 'resources/redirect.php?Redirect=' + |
| encodeURIComponent('/resources/registration-worker.js'); |
| - var scope = 'resources/sope/redirect/'; |
| + var scope = 'resources/scope/redirect/'; |
| return assert_promise_rejects( |
| navigator.serviceWorker.register(script, {scope: scope}), |
| 'SecurityError', |
| 'Registration of redirected script should fail.'); |
| }, 'Registering redirected script'); |
| +promise_test(function(t) { |
| + var script = 'resources/malformed-script.js'; |
| + var scope = 'resources/registration/malformed-worker'; |
|
falken
2014/11/04 05:47:55
Be consistent with the other scopes in this file:
nhiroki
2014/11/04 08:56:21
Done.
|
| + return assert_promise_rejects( |
| + navigator.serviceWorker.register(script, {scope: scope}), |
| + 'AbortError', |
| + 'Registration of malformed script should fail.'); |
| + }, 'Registering malformed script'); |
| + |
| +promise_test(function(t) { |
| + var script = 'resources/import-malformed-script.js'; |
| + var scope = 'resources/registration/import-malformed-script'; |
| + return assert_promise_rejects( |
| + navigator.serviceWorker.register(script, {scope: scope}), |
| + 'AbortError', |
| + 'Registration of script importing malformed script should fail.'); |
| + }, 'Registering script importing malformed script'); |
| + |
| </script> |