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

Unified Diff: LayoutTests/http/tests/serviceworker/fetch-frame-resource.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 side-by-side diff with in-line comments
Download patch
Index: LayoutTests/http/tests/serviceworker/fetch-frame-resource.html
diff --git a/LayoutTests/http/tests/serviceworker/fetch-frame-resource.html b/LayoutTests/http/tests/serviceworker/fetch-frame-resource.html
index 451ec20adb6ec55b1046dd560bb5d4a28921d392..da1edc8fb656fbe3d775ca48e8da2329f08ccc71 100644
--- a/LayoutTests/http/tests/serviceworker/fetch-frame-resource.html
+++ b/LayoutTests/http/tests/serviceworker/fetch-frame-resource.html
@@ -16,7 +16,9 @@ if (window.testRunner) {
async_test(function(t) {
var scope = 'resources/fetch-frame-resource/frame-basic';
service_worker_unregister_and_register(t, worker, scope)
- .then(function(reg) { return wait_for_activated(t, reg); })
+ .then(function(reg) {
+ return wait_for_state(t, reg.installing, 'activated');
+ })
.then(function() {
return with_iframe(
scope + '?url=' +
@@ -36,7 +38,9 @@ async_test(function(t) {
async_test(function(t) {
var scope = 'resources/fetch-frame-resource/frame-cors';
service_worker_unregister_and_register(t, worker, scope)
- .then(function(reg) { return wait_for_activated(t, reg); })
+ .then(function(reg) {
+ return wait_for_state(t, reg.installing, 'activated');
+ })
.then(function() {
return with_iframe(
scope + '?mode=cors&url=' +
@@ -57,7 +61,9 @@ async_test(function(t) {
async_test(function(t) {
var scope = 'resources/fetch-frame-resource/frame-opaque';
service_worker_unregister_and_register(t, worker, scope)
- .then(function(reg) { return wait_for_activated(t, reg); })
+ .then(function(reg) {
+ return wait_for_state(t, reg.installing, 'activated');
+ })
.then(function() {
var frame = document.createElement('iframe');
frame.src =
@@ -83,7 +89,9 @@ async_test(function(t) {
async_test(function(t) {
var scope = 'resources/fetch-frame-resource/window-basic';
service_worker_unregister_and_register(t, worker, scope)
- .then(function(reg) { return wait_for_activated(t, reg); })
+ .then(function(reg) {
+ return wait_for_state(t, reg.installing, 'activated');
+ })
.then(function() {
return new Promise(function(resolve) {
var win = window.open(
@@ -106,7 +114,9 @@ async_test(function(t) {
async_test(function(t) {
var scope = 'resources/fetch-frame-resource/window-cors';
service_worker_unregister_and_register(t, worker, scope)
- .then(function(reg) { return wait_for_activated(t, reg); })
+ .then(function(reg) {
+ return wait_for_state(t, reg.installing, 'activated');
+ })
.then(function() {
return new Promise(function(resolve) {
var win = window.open(
@@ -130,7 +140,9 @@ async_test(function(t) {
async_test(function(t) {
var scope = 'resources/fetch-frame-resource/window-opaque';
service_worker_unregister_and_register(t, worker, scope)
- .then(function(reg) { return wait_for_activated(t, reg); })
+ .then(function(reg) {
+ return wait_for_state(t, reg.installing, 'activated');
+ })
.then(function() {
var win = window.open(
scope + '?mode=no-cors&url=' +
@@ -151,4 +163,4 @@ async_test(function(t) {
.catch(unreached_rejection(t));
}, 'Opaque type response could not be loaded in the new window.');
</script>
-</body>
+</body>

Powered by Google App Engine
This is Rietveld 408576698