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

Side by Side Diff: third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/registration-events.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: registration events</title> 2 <title>Service Worker: registration events</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/testharnessreport.js"></script>
5 <script src="resources/test-helpers.js"></script> 5 <script src="resources/test-helpers.sub.js"></script>
6 <script> 6 <script>
7 var t = async_test('Registration: events'); 7 var t = async_test('Registration: events');
8 t.step(function() { 8 t.step(function() {
9 var scope = 'resources/in-scope/'; 9 var scope = 'resources/in-scope/';
10 service_worker_unregister_and_register( 10 service_worker_unregister_and_register(
11 t, 'resources/events-worker.js', scope) 11 t, 'resources/events-worker.js', scope)
12 .then(t.step_func(function(registration) { 12 .then(t.step_func(function(registration) {
13 onRegister(registration.installing); 13 onRegister(registration.installing);
14 })) 14 }))
15 .catch(unreached_rejection(t)); 15 .catch(unreached_rejection(t));
(...skipping 12 matching lines...) Expand all
28 sendMessagePort(sw, 'registering doc').onmessage = t.step_func(funct ion (e) { 28 sendMessagePort(sw, 'registering doc').onmessage = t.step_func(funct ion (e) {
29 assert_array_equals(e.data.events, 29 assert_array_equals(e.data.events,
30 ['install', 'activate'], 30 ['install', 'activate'],
31 'Worker should see install then activate even ts'); 31 'Worker should see install then activate even ts');
32 service_worker_unregister_and_done(t, scope); 32 service_worker_unregister_and_done(t, scope);
33 }); 33 });
34 }); 34 });
35 } 35 }
36 }); 36 });
37 </script> 37 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698