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

Side by Side Diff: LayoutTests/http/tests/serviceworker/fetch-request-css-base-url.html

Issue 776373003: ServiceWorker cleanup: remove wait_for_update() in favor of r.installing in most tests (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years 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 | Annotate | Revision Log
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <title>Service Worker: CSS's base URL must be the request URL even when fetched from other URL</title> 2 <title>Service Worker: CSS's base URL must be the request URL even when fetched from other URL</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?pipe=sub"></script> 5 <script src="resources/test-helpers.js?pipe=sub"></script>
6 <script> 6 <script>
7 async_test(function(t) { 7 async_test(function(t) {
8 var SCOPE = 'resources/fetch-request-css-base-url-iframe.html'; 8 var SCOPE = 'resources/fetch-request-css-base-url-iframe.html';
9 var SCRIPT = 'resources/fetch-request-css-base-url-worker.js'; 9 var SCRIPT = 'resources/fetch-request-css-base-url-worker.js';
10 var worker; 10 var worker;
11 var frame; 11 var frame;
12 12
13 return service_worker_unregister_and_register(t, SCRIPT, SCOPE) 13 return service_worker_unregister_and_register(t, SCRIPT, SCOPE)
14 .then(function(registration) { 14 .then(function(registration) {
15 return wait_for_update(t, registration); 15 worker = registration.installing;
16 }) 16 return wait_for_state(t, worker, 'activated');
17 .then(function(sw) {
18 worker = sw;
19 return wait_for_state(t, sw, 'activated');
20 }) 17 })
21 .then(function() { 18 .then(function() {
22 return new Promise(function(resolve) { 19 return new Promise(function(resolve) {
23 var channel = new MessageChannel(); 20 var channel = new MessageChannel();
24 channel.port1.onmessage = t.step_func(function(msg) { 21 channel.port1.onmessage = t.step_func(function(msg) {
25 if (msg.data.ready) { 22 if (msg.data.ready) {
26 resolve(); 23 resolve();
27 return; 24 return;
28 } 25 }
29 var result = msg.data; 26 var result = msg.data;
(...skipping 15 matching lines...) Expand all
45 {port: channel.port2}, [channel.port2]); 42 {port: channel.port2}, [channel.port2]);
46 }); 43 });
47 }) 44 })
48 .then(function() { return with_iframe(SCOPE); }) 45 .then(function() { return with_iframe(SCOPE); })
49 .then(function(f) { 46 .then(function(f) {
50 frame = f; 47 frame = f;
51 }) 48 })
52 .catch(unreached_rejection(t)); 49 .catch(unreached_rejection(t));
53 }, 'CSS\'s base URL must be the request URL even when fetched from other URL.' ); 50 }, 'CSS\'s base URL must be the request URL even when fetched from other URL.' );
54 </script> 51 </script>
OLDNEW
« no previous file with comments | « LayoutTests/http/tests/serviceworker/fetch-csp.html ('k') | LayoutTests/http/tests/serviceworker/fetch-request-fallback.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698