| Index: third_party/WebKit/LayoutTests/http/tests/background_sync/oneshot.html
|
| diff --git a/third_party/WebKit/LayoutTests/http/tests/background_sync/oneshot.html b/third_party/WebKit/LayoutTests/http/tests/background_sync/oneshot.html
|
| index e2090b943753f1e4c25657725ad3118aa32c0d53..a763ab2e907c9e0d48bfc32a06624dc790123290 100644
|
| --- a/third_party/WebKit/LayoutTests/http/tests/background_sync/oneshot.html
|
| +++ b/third_party/WebKit/LayoutTests/http/tests/background_sync/oneshot.html
|
| @@ -14,9 +14,7 @@ promise_test(function(t) {
|
| var sync_manager;
|
| var sync_registration;
|
|
|
| - // This test verifies that one-shot syncs can be registered from service-
|
| - // worker-controlled documents. It creates a frame, after the service worker
|
| - // is active, in order to use its service worker registration.
|
| + // This test verifies that registration of one-shots fails from an iframe.
|
| return service_worker_unregister_and_register(t, url, scope)
|
| .then(function(sw_registration_page) {
|
| return wait_for_state(t, sw_registration_page.installing, 'activated');
|
| @@ -38,10 +36,13 @@ promise_test(function(t) {
|
| return sync_manager.register('abcde');
|
| })
|
| .then(function() {
|
| - return service_worker_unregister(t, scope);
|
| + assert_unreached('iframes should not be able to register syncs');
|
| + }, function(e) {
|
| + assert_equals(e.name, 'AbortError');
|
| + assert_equals(e.message, 'Registration failed - not called from a main frame.');
|
| + service_worker_unregister(t, scope);
|
| });
|
| - }, 'Background Sync API should allow one-shot syncs to be registered from ' +
|
| - 'the Document scope');
|
| + }, 'Background Sync should not allow registration from an iframe');
|
|
|
| promise_test(function(t) {
|
| var url = 'resources/empty_worker.js';
|
| @@ -66,5 +67,5 @@ promise_test(function(t) {
|
| return service_worker_unregister(t, scope);
|
| })
|
| }, 'Background Sync API should allow one-shot syncs to be registered ' +
|
| - 'with window clients not currently controlled by service worker');
|
| + 'from an uncontrolled main-frame document');
|
| </script>
|
|
|