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

Side by Side Diff: LayoutTests/http/tests/serviceworker/appcache-ordering-main.html

Issue 790683002: ServiceWorker cleanup: remove wait_for_activated(); just use wait_for_state() (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
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/chromium/memory-cache.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <script src="../resources/testharness.js"></script> 2 <script src="../resources/testharness.js"></script>
3 <script src="../resources/testharnessreport.js"></script> 3 <script src="../resources/testharnessreport.js"></script>
4 <script src="resources/test-helpers.js"></script> 4 <script src="resources/test-helpers.js"></script>
5 <body> 5 <body>
6 <script> 6 <script>
7 7
8 var INSTALL_APPCACHE_URL = "resources/appcache-ordering.install.html"; 8 var INSTALL_APPCACHE_URL = "resources/appcache-ordering.install.html";
9 var IS_APPCACHED_URL = "resources/appcache-ordering.is-appcached.html"; 9 var IS_APPCACHED_URL = "resources/appcache-ordering.is-appcached.html";
10 var SERVICE_WORKER_SCOPE = "resources/appcache-ordering"; 10 var SERVICE_WORKER_SCOPE = "resources/appcache-ordering";
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 }) 63 })
64 .then(function() { 64 .then(function() {
65 return is_appcached(); 65 return is_appcached();
66 }) 66 })
67 .then(function(result) { 67 .then(function(result) {
68 assert_true(result, 'appcache should initially be utilized'); 68 assert_true(result, 'appcache should initially be utilized');
69 return service_worker_unregister_and_register( 69 return service_worker_unregister_and_register(
70 t, SERVICE_WORKER_SCRIPT, SERVICE_WORKER_SCOPE); 70 t, SERVICE_WORKER_SCRIPT, SERVICE_WORKER_SCOPE);
71 }) 71 })
72 .then(function(r) { 72 .then(function(r) {
73 return wait_for_activated(t, r); 73 return wait_for_state(t, r.installing, 'activated');
74 }) 74 })
75 .then(function() { 75 .then(function() {
76 return is_appcached(); 76 return is_appcached();
77 }) 77 })
78 .then(function(result) { 78 .then(function(result) {
79 assert_false(result, 'but serviceworkers should take priority'); 79 assert_false(result, 'but serviceworkers should take priority');
80 service_worker_unregister_and_done(t, SERVICE_WORKER_SCOPE); 80 service_worker_unregister_and_done(t, SERVICE_WORKER_SCOPE);
81 }) 81 })
82 .catch(unreached_rejection(t)); 82 .catch(unreached_rejection(t));
83 }, 'serviceworkers take priority over appcaches'); 83 }, 'serviceworkers take priority over appcaches');
84 84
85 </script> 85 </script>
86 </body> 86 </body>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/serviceworker/chromium/memory-cache.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698