-
-
Save jugglinmike/30eda43475da2e759d270442f15192bc to your computer and use it in GitHub Desktop.
sw-migration-script-url.diff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/serviceworkerobject-scripturl.html b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/serviceworkerobject-scripturl.https.html | |
index 2fc512b..95587a5 100644 | |
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/serviceworkerobject-scripturl.html | |
+++ b/third_party/WebKit/LayoutTests/external/wpt/service-workers/service-worker/serviceworkerobject-scripturl.https.html | |
@@ -1,14 +1,14 @@ | |
<!DOCTYPE html> | |
<title>ServiceWorker object: scriptURL property</title> | |
-<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> | |
<script> | |
function url_test(name, url) { | |
var scope = 'resources/scope/' + name; | |
async_test(function(t) { | |
- var expectedURL = normalizeURL(url); | |
+ var expectedURL = (new URL(url, window.location)).toString(); | |
service_worker_unregister_and_register(t, url, scope) | |
.then(function(registration) { | |
var worker = registration.installing; | |
@@ -21,8 +21,6 @@ function url_test(name, url) { | |
} | |
url_test('relative', 'resources/empty-worker.js'); | |
-url_test('with-fragment', 'resources/empty-worker.js#ref'); | |
-url_test('absolute', window.location.origin + | |
- '/serviceworker/resources/empty-worker.js'); | |
+url_test('absolute', (new URL('./resources/empty-worker.js', window.location)).href); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment