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

Unified Diff: third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/serviceworkerobject-scripturl.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/serviceworkerobject-scripturl.https.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/serviceworker/serviceworkerobject-scripturl.html b/third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/serviceworkerobject-scripturl.https.html
similarity index 64%
copy from third_party/WebKit/LayoutTests/http/tests/serviceworker/serviceworkerobject-scripturl.html
copy to third_party/WebKit/LayoutTests/imported/wpt/service-workers/service-worker/serviceworkerobject-scripturl.https.html
index 2fc512b19202baaccff9aef0fc1432238bf60a26..95587a5a42d980435f2d3ca6cc1450b8b0ce6fde 100644
--- a/third_party/WebKit/LayoutTests/http/tests/serviceworker/serviceworkerobject-scripturl.html
+++ b/third_party/WebKit/LayoutTests/imported/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>

Powered by Google App Engine
This is Rietveld 408576698