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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/background_sync/oneshot.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/http/tests/background_sync/oneshot.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/background_sync/oneshot.html b/third_party/WebKit/LayoutTests/http/tests/background_sync/oneshot.html
index 24ae30ed7b343e7117411237250462efb5fbea54..6e416711c5e83a346816314ad0ffb6f16acfe43b 100644
--- a/third_party/WebKit/LayoutTests/http/tests/background_sync/oneshot.html
+++ b/third_party/WebKit/LayoutTests/http/tests/background_sync/oneshot.html
@@ -9,10 +9,10 @@
<script>
promise_test(function(t) {
- var url = 'resources/empty_worker.js';
- var scope = 'resources/scope/background_sync/oneshot.html';
+ const url = 'resources/empty_worker.js';
+ const iframe_scope = 'oneshot.html';
+ const scope = 'resources/scope/background_sync/' + iframe_scope;
var sync_manager;
- var sync_registration;
// This test verifies that registration of one-shots fails from an iframe.
return PermissionsHelper.setPermission('background-sync', 'granted')
@@ -27,7 +27,7 @@ promise_test(function(t) {
})
.then(function(frame) {
var w = frame.contentWindow;
- return w.navigator.serviceWorker.getRegistration(scope);
+ return w.navigator.serviceWorker.getRegistration(iframe_scope);
})
.then(function(sw_registration_frame) {
sync_manager = sw_registration_frame.sync;
@@ -45,10 +45,9 @@ promise_test(function(t) {
'from an iframe');
promise_test(function(t) {
- var url = 'resources/empty_worker.js';
- var scope = 'resources/scope/background_sync/oneshot-uncontrolled.html';
+ const url = 'resources/empty_worker.js';
+ const scope = 'resources/scope/background_sync/oneshot-uncontrolled.html';
var sync_manager;
- var sync_registration;
// This test verifies that one-shot syncs can be registered from uncontrolled
// documents.

Powered by Google App Engine
This is Rietveld 408576698