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 60bafe9fdc95430b71b0c9dd74d5af79f7075335..149e96cf01ceae19428d5d2b2d113c642687b00b 100644 |
| --- a/LayoutTests/http/tests/serviceworker/registration.html |
| +++ b/LayoutTests/http/tests/serviceworker/registration.html |
| @@ -44,6 +44,24 @@ |
| }()); |
| (function() { |
| + var t = async_test('Registering default scope'); |
|
jsbell
2014/06/18 17:57:03
There's a test for the default scope in servicewor
xiang
2014/06/19 04:57:45
The default scope tests in serviceworkerglobalscop
|
| + t.step(function() { |
| + navigator.serviceWorker.register('resources/registration-worker.js' |
| + ).then( |
| + t.step_func(function(worker) { |
| + var default_scope = '/*'; |
| + assert_equals(worker.scope, location.origin + default_scope, |
| + 'Registration scope should default to "/*".'); |
| + service_worker_unregister_and_done(t, default_scope); |
| + }), |
| + t.step_func(function(reason) { |
| + assert_unreached('Registration should succeed, but failed: ' + reason.name); |
| + }) |
| + ); |
| + }); |
| +}()); |
| + |
| +(function() { |
| var t = async_test('Registering script outside domain'); |
| t.step(function() { |
| navigator.serviceWorker.register( |