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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/register-wait-forever-in-install-worker.html

Issue 2892473003: Upstream service worker "register" tests to WPT (Closed)
Patch Set: Created 3 years, 7 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>Service Worker: Register wait-forever-in-install-worker</title>
3 <script src="../resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script>
5 <script src="resources/test-helpers.js"></script>
6 <script>
7
8 promise_test(function(t) {
9 var bad_script = 'resources/wait-forever-in-install-worker.js';
10 var good_script = 'resources/empty-worker.js';
11 var scope = 'resources/wait-forever-in-install-worker';
12 return navigator.serviceWorker.register(bad_script, {scope: scope})
13 .then(function(registration) {
14 assert_equals(registration.installing.scriptURL,
15 normalizeURL(bad_script));
16 return navigator.serviceWorker.register(good_script, {scope: scope});
17 })
18 .then(function(registration) {
19 assert_equals(registration.installing.scriptURL,
20 normalizeURL(good_script));
21 return wait_for_state(t, registration.installing, 'activated');
22 })
23 .then(function() {
24 return service_worker_unregister_and_done(t, scope);
25 })
26 }, 'register worker that calls waitUntil with a promise that never ' +
27 'resolves in oninstall');
28
29 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698