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 c5ceace35b0b774d0325178d088a73cd5d29c32c..7c03bba4201014dd8bef779fc4abf8cf602e3459 100644 |
| --- a/LayoutTests/http/tests/serviceworker/registration.html |
| +++ b/LayoutTests/http/tests/serviceworker/registration.html |
| @@ -228,16 +228,25 @@ promise_test(function(t) { |
| var scope = 'resources/scope/encoded-slash-in-script-url'; |
| return assert_promise_rejects( |
| navigator.serviceWorker.register(script, {scope: scope}), |
| - 'SecurityError', |
| + new TypeError, |
|
nhiroki
2015/07/31 07:43:30
Just passing a string 'TypeError' doesn't work?
|
| 'URL-encoded slash in the script URL should be rejected.'); |
| }, 'Script URL including URL-encoded slash'); |
| promise_test(function(t) { |
| + var script = 'resources%2Fempty-worker.js'; |
| + var scope = 'resources/scope/encoded-slash-in-script-url'; |
| + return assert_promise_rejects( |
| + navigator.serviceWorker.register(script, {scope: scope}), |
| + new TypeError, |
| + 'URL-encoded slash in the script URL should be rejected.'); |
| + }, 'Script URL including uppercase URL-encoded slash'); |
| + |
| +promise_test(function(t) { |
| var script = 'resources/empty-worker.js'; |
| var scope = 'resources/scope%2fencoded-slash-in-scope'; |
| return assert_promise_rejects( |
| navigator.serviceWorker.register(script, {scope: scope}), |
| - 'SecurityError', |
| + new TypeError, |
| 'URL-encoded slash in the scope should be rejected.'); |
| }, 'Scope including URL-encoded slash'); |
| @@ -246,16 +255,25 @@ promise_test(function(t) { |
| var scope = 'resources/scope/encoded-slash-in-script-url'; |
| return assert_promise_rejects( |
| navigator.serviceWorker.register(script, {scope: scope}), |
| - 'SecurityError', |
| + new TypeError, |
| 'URL-encoded backslash in the script URL should be rejected.'); |
| }, 'Script URL including URL-encoded backslash'); |
| promise_test(function(t) { |
| + var script = 'resources%5Cempty-worker.js'; |
| + var scope = 'resources/scope/encoded-slash-in-script-url'; |
| + return assert_promise_rejects( |
| + navigator.serviceWorker.register(script, {scope: scope}), |
| + new TypeError, |
| + 'URL-encoded backslash in the script URL should be rejected.'); |
| + }, 'Script URL including uppercase URL-encoded backslash'); |
| + |
| +promise_test(function(t) { |
| var script = 'resources/empty-worker.js'; |
| var scope = 'resources/scope%5cencoded-slash-in-scope'; |
| return assert_promise_rejects( |
| navigator.serviceWorker.register(script, {scope: scope}), |
| - 'SecurityError', |
| + new TypeError, |
| 'URL-encoded backslash in the scope should be rejected.'); |
| }, 'Scope including URL-encoded backslash'); |