| Index: LayoutTests/http/tests/serviceworker/unregister-controller.html
|
| diff --git a/LayoutTests/http/tests/serviceworker/unregister-controller.html b/LayoutTests/http/tests/serviceworker/unregister-controller.html
|
| index 4939a3c29c4de40a316f7d25b64e380e414d5934..2c5abc39d37a417033397f2f3aaa07c2b80ed8ae 100644
|
| --- a/LayoutTests/http/tests/serviceworker/unregister-controller.html
|
| +++ b/LayoutTests/http/tests/serviceworker/unregister-controller.html
|
| @@ -68,4 +68,36 @@ async_test(function(t) {
|
| })
|
| .catch(unreached_rejection(t));
|
| }, 'Unregister prevents control of subsequent navigations');
|
| +
|
| +async_test(function(t) {
|
| + var scope =
|
| + 'scope/no-new-controllee-even-if-registration-is-still-used';
|
| + var worker;
|
| + var frame_window;
|
| + var controller;
|
| +
|
| + service_worker_unregister_and_register(t, worker_url, scope)
|
| + .then(function(registered_worker) {
|
| + worker = registered_worker;
|
| + return wait_for_state(t, worker, 'activated');
|
| + })
|
| + .then(function() {
|
| + return with_iframe(scope);
|
| + })
|
| + .then(function(frame) {
|
| + frame_window = frame.contentWindow;
|
| + controller = frame_window.navigator.serviceWorker.controller;
|
| + return navigator.serviceWorker.unregister(scope);
|
| + })
|
| + .then(function() {
|
| + return with_iframe(scope);
|
| + })
|
| + .then(function(frame) {
|
| + assert_equals(frame.contentWindow.navigator.serviceWorker.controller,
|
| + null,
|
| + 'document should not have a controller');
|
| + t.done();
|
| + })
|
| + .catch(unreached_rejection(t));
|
| + }, 'Unregister prevents new controllee even if registration is still in use');
|
| </script>
|
|
|