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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/onactivate-script-error.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/onactivate-script-error.https.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/onactivate-script-error.html b/third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/onactivate-script-error.https.html
similarity index 81%
copy from third_party/WebKit/LayoutTests/http/tests/serviceworker/onactivate-script-error.html
copy to third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/onactivate-script-error.https.html
index bbe028e8ef288f9abe073a6d9d6e88bc530aaeed..23a7f2c86868ee57b0556b63c1caa23d6db40c8f 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/onactivate-script-error.html
+++ b/third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/onactivate-script-error.https.html
@@ -1,7 +1,8 @@
<!DOCTYPE html>
-<script src="../resources/testharness.js"></script>
-<script src="../resources/testharnessreport.js"></script>
-<script src="resources/test-helpers.js"></script>
+<script src="/resources/testharness.js"></script>
+<script src="resources/testharness-helpers.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="resources/test-helpers.sub.js"></script>
<script>
function wait_for_install(worker) {
return new Promise(function(resolve, reject) {
@@ -36,6 +37,12 @@ function make_test(name, script) {
})
.then(function() {
// Activate should succeed regardless of script errors.
+ if (registration.active && registration.active.state == 'activated') {
+ return Promise.resolve();
+ } else if (registration.active) {
+ return wait_for_activate(registration.active);
+ }
+
return wait_for_activate(registration.waiting);
});
}, name);

Powered by Google App Engine
This is Rietveld 408576698