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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/skip-waiting.https.html

Issue 2415873002: Import w3c tests for the service workers (Closed)
Patch Set: Rebase Created 4 years, 2 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
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Service Worker: Skip waiting</title> 2 <title>Service Worker: Skip waiting</title>
3 <script src="../resources/testharness.js"></script> 3 <script src="/resources/testharness.js"></script>
4 <script src="../resources/testharnessreport.js"></script> 4 <script src="resources/testharness-helpers.js"></script>
5 <script src="resources/test-helpers.js"></script> 5 <script src="/resources/testharnessreport.js"></script>
6 <script src="resources/test-helpers.sub.js"></script>
6 <script> 7 <script>
7 8
8 promise_test(function(t) { 9 promise_test(function(t) {
9 var scope = 'resources/blank.html'; 10 var scope = 'resources/blank.html';
10 var url1 = 'resources/empty.js'; 11 var url1 = 'resources/empty.js';
11 var url2 = 'resources/empty-worker.js'; 12 var url2 = 'resources/empty-worker.js';
12 var url3 = 'resources/skip-waiting-worker.js'; 13 var url3 = 'resources/skip-waiting-worker.js';
13 var frame, sw_registration, activated_worker, waiting_worker; 14 var frame, sw_registration, activated_worker, waiting_worker;
14 return service_worker_unregister_and_register(t, url1, scope) 15 return service_worker_unregister_and_register(t, url1, scope)
15 .then(function(registration) { 16 .then(function(registration) {
(...skipping 28 matching lines...) Expand all
44 assert_equals(waiting_worker.state, 'redundant', 45 assert_equals(waiting_worker.state, 'redundant',
45 'Worker with url2 should be redundant'); 46 'Worker with url2 should be redundant');
46 assert_equals(sw_registration.active.scriptURL, normalizeURL(url3), 47 assert_equals(sw_registration.active.scriptURL, normalizeURL(url3),
47 'Worker with url3 should be activated'); 48 'Worker with url3 should be activated');
48 frame.remove(); 49 frame.remove();
49 return service_worker_unregister_and_done(t, scope); 50 return service_worker_unregister_and_done(t, scope);
50 }); 51 });
51 }, 'Test skipWaiting with both active and waiting workers'); 52 }, 'Test skipWaiting with both active and waiting workers');
52 53
53 </script> 54 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698