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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/serviceworker/skip-waiting-without-using-registration.html

Issue 2900183002: Upstream service wrkr "skipWaiting" tests to WPT (Closed)
Patch Set: Improve assertion message Created 3 years, 6 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 | « third_party/WebKit/LayoutTests/http/tests/serviceworker/skip-waiting-without-client.html ('k') | no next file » | 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 <title>Service Worker: Skip waiting without using registration</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 scope = 'resources/blank.html';
10 var url = 'resources/skip-waiting-worker.js';
11 var frame, frame_sw, sw_registration;
12
13 return service_worker_unregister(t, scope)
14 .then(function() {
15 return with_iframe(scope);
16 })
17 .then(function(f) {
18 frame = f;
19 frame_sw = f.contentWindow.navigator.serviceWorker;
20 assert_equals(frame_sw.controller, null,
21 'Document controller should be null');
22 return navigator.serviceWorker.register(url, {scope: scope});
23 })
24 .then(function(registration) {
25 sw_registration = registration;
26 add_completion_callback(function() {
27 registration.unregister();
28 });
29 return wait_for_state(t, registration.installing, 'activated');
30 })
31 .then(function() {
32 assert_equals(frame_sw.controller, null,
33 'Document controller should still be null');
34 assert_not_equals(sw_registration.active, null,
35 'Registration active worker should not be null');
36 fetch_tests_from_worker(sw_registration.active);
37 frame.remove();
38 });
39 }, 'Test skipWaiting while a client is not being controlled');
40
41 </script>
OLDNEW
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/serviceworker/skip-waiting-without-client.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698