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

Unified Diff: third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/controller-on-reload.https.html

Issue 2691903005: ServiceWorker: Change base URL for parsing script URL and scope URL (Closed)
Patch Set: Address comments on tests Created 3 years, 10 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/external/wpt/service-workers/service-worker/controller-on-reload.https.html
diff --git a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/controller-on-reload.https.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/controller-on-reload.https.html
index 4490c707963bd9371b997bdbfd0819c6fccc9b78..e0beb7260be11608439aa16bce0c16a025f24858 100644
--- a/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/controller-on-reload.https.html
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/controller-on-reload.https.html
@@ -6,7 +6,8 @@
<body>
<script>
promise_test(function(t) {
- var scope = 'resources/blank.html';
+ const iframe_scope = 'blank.html';
+ const scope = 'resources/' + iframe_scope;
var frame;
var registration;
var controller;
@@ -17,7 +18,7 @@ promise_test(function(t) {
.then(function(f) {
frame = f;
return frame.contentWindow.navigator.serviceWorker.register(
- 'resources/empty-worker.js', {scope: scope});
+ 'empty-worker.js', {scope: iframe_scope});
})
.then(function(swr) {
registration = swr;
@@ -42,7 +43,7 @@ promise_test(function(t) {
// objects from separate windows should not be equal
assert_not_equals(controller, registration.active);
- return w.navigator.serviceWorker.getRegistration();
+ return w.navigator.serviceWorker.getRegistration(iframe_scope);
})
.then(function(frameRegistration) {
assert_equals(frameRegistration.active, controller);

Powered by Google App Engine
This is Rietveld 408576698