Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/chromium/reclaim-registration-after-iframe-deletion.html

Issue 1893363003: ServiceWorker: Refer to the current provider in ServiceWorkerRegistration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <meta charset="utf-8">
3 <title>Service Worker: Reclaiming registration after removal of iframe</title>
4 <script src="../../resources/testharness.js"></script>
5 <script src="../../resources/testharnessreport.js"></script>
6 <script src="../../resources/testharness-helpers.js"></script>
7 <script src="../resources/test-helpers.js"></script>
8 <script>
9 promise_test(function(t) {
10 var url = 'resources/blank.html';
11 var scope = 'resources/reclam-registration-after-iframe-deletion';
nhiroki 2016/04/20 03:42:16 s/reclam/reclaim/ BTW, "reclaim-registration" mig
shimazu 2016/04/21 03:57:50 Done.
12 var script = 'resources/empty-worker.js';
13 var frame;
14 var registration;
15
16 return service_worker_unregister(t, scope)
17 .then(function() {
18 return with_iframe(url, {auto_remove: false});
19 })
20 .then(function(f) {
21 frame = f;
22 return frame.contentWindow.navigator.serviceWorker.register(
23 script,
24 { scope: scope });
25 })
26 .then(function(r) {
27 add_completion_callback(
28 service_worker_unregister.bind(null, t, scope));
nhiroki 2016/04/20 03:42:15 This couldn't work because "service_worker_unregis
shimazu 2016/04/21 03:57:50 Done.
29 registration = r;
30 frame.remove();
31 })
32 .then(function() {
nhiroki 2016/04/20 03:42:16 Maybe we don't have to separate these operations i
shimazu 2016/04/21 03:57:50 Done.
33 return assert_promise_rejects(
nhiroki 2016/04/20 03:42:16 'return' is not necessary.
shimazu 2016/04/21 03:57:50 assert_promise_rejects() returns Promise object co
nhiroki 2016/04/21 08:23:30 Ah, sorry! I wrongly assumed that assert_promise_r
34 registration.unregister(),
35 'InvalidStateError',
36 'Unregistration on a detached iframe should throw an exception'
37 );
38 });
39 }, 'unregistration to should be finished successfully');
nhiroki 2016/04/20 03:42:16 There is an extra space between "to" and "should".
shimazu 2016/04/21 03:57:50 Done.
40 </script>
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/Source/modules/serviceworkers/ServiceWorkerRegistration.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698