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

Side by Side Diff: LayoutTests/http/tests/serviceworker/install-event-type.html

Issue 1067513002: Removing ServiceWorker's InstallEvent Interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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 | LayoutTests/http/tests/serviceworker/resources/install-event-type-worker.js » ('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 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharness-helpers.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <script src="resources/test-helpers.js"></script>
6 <script>
7 function wait_for_install_event(worker) {
8 return new Promise(function(resolve) {
9 worker.addEventListener('statechange', function(event) {
10 if (worker.state == 'installed')
11 resolve(true);
12 else if (worker.state == 'redundant')
13 resolve(false);
14 });
15 });
16 }
17
18 promise_test(function(t) {
19 var script = 'resources/install-event-type-worker.js';
20 var scope = 'resources/install-event-type';
21 return service_worker_unregister_and_register(t, script, scope)
22 .then(function(registration) {
23 return wait_for_install_event(registration.installing);
24 })
25 .then(function(did_install) {
26 assert_true(did_install, 'The worker was installed');
27 })
28 }, 'install event type');
29
30 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/resources/install-event-type-worker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698