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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/multiple-register.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/multiple-register.https.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/multiple-register.html b/third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/multiple-register.https.html
similarity index 91%
copy from third_party/WebKit/LayoutTests/http/tests/serviceworker/multiple-register.html
copy to third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/multiple-register.https.html
index f6fa22909e81627422858c71af52f77ad05ac4ff..1089cffda914262840396aac65ab1272bd39a3c1 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/multiple-register.html
+++ b/third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/multiple-register.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/testharnessreport.js"></script>
+<script src="resources/test-helpers.sub.js"></script>
+<body>
<script>
var worker_url = 'resources/empty-worker.js';
@@ -40,7 +41,7 @@ async_test(function(t) {
registration = r;
return wait_for_state(t, r.installing, 'activated');
})
- .then(function() { return with_iframe('out-of-scope'); })
+ .then(function() { return with_iframe('resources/404.py'); })
.then(function(f) {
frame = f;
return frame.contentWindow.navigator.serviceWorker.register(
@@ -69,7 +70,7 @@ async_test(function(t) {
assert_not_equals(
registration.active, new_registration.active,
- 'registration should have a different active worker');
+ 'registration should have the different active worker');
assert_equals(
registration.active.scriptURL,
new_registration.active.scriptURL,
@@ -90,12 +91,11 @@ async_test(function(t) {
async_test(function(t) {
var scope = 'resources/scope/concurrent-register';
- var number_of_registrations = 10;
service_worker_unregister(t, scope)
.then(function() {
var promises = [];
- for (var i = 0; i < number_of_registrations; ++i) {
+ for (var i = 0; i < 10; ++i) {
promises.push(navigator.serviceWorker.register(worker_url,
{ scope: scope }));
}
@@ -113,3 +113,4 @@ async_test(function(t) {
}, 'Concurrent registrations resolve to the same registration object');
</script>
+</body>

Powered by Google App Engine
This is Rietveld 408576698