Update WPT service-worker resource-timing test to use hosts[alt]
authoryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Apr 2019 16:23:20 +0000 (16:23 +0000)
committeryouenn@apple.com <youenn@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Apr 2019 16:23:20 +0000 (16:23 +0000)
https://bugs.webkit.org/show_bug.cgi?id=197329

Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

Set alt server as 127.0.0.1.
Use hosts[alt][] instead of domains[www] to trigger a cross origin load.

* resources/config.json:
* web-platform-tests/service-workers/service-worker/resource-timing.https-expected.txt: Removed.
* web-platform-tests/service-workers/service-worker/resource-timing.sub.https-expected.txt: Added.
* web-platform-tests/service-workers/service-worker/resource-timing.sub.https.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.https.html.
* web-platform-tests/service-workers/service-worker/resources/resource-timing-iframe.sub.html:

LayoutTests:

* TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@244776 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/resources/config.json
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.https-expected.txt [deleted file]
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.sub.https-expected.txt [new file with mode: 0644]
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.sub.https.html [moved from LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.https.html with 96% similarity]
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resources/resource-timing-iframe.sub.html

index 77601c1..47a8225 100644 (file)
@@ -1,3 +1,12 @@
+2019-04-30  Youenn Fablet  <youenn@apple.com>
+
+        Update WPT service-worker resource-timing test to use hosts[alt]
+        https://bugs.webkit.org/show_bug.cgi?id=197329
+
+        Reviewed by Chris Dumez.
+
+        * TestExpectations:
+
 2019-04-30  Zalan Bujtas  <zalan@apple.com>
 
         Double-tapping a post to like doesn't work on Instagram.com (needs 'dblclick' event)
index 430bfcd..2c26f88 100644 (file)
@@ -211,7 +211,7 @@ imported/w3c/web-platform-tests/service-workers/service-worker/worker-in-sandbox
 
 # Newly imported service worker tests that are flaky.
 imported/w3c/web-platform-tests/service-workers/service-worker/navigation-redirect-to-http.https.html [ Pass Failure ]
-imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.https.html [ Pass Failure ]
+imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.sub.https.html [ Pass Failure ]
 imported/w3c/web-platform-tests/service-workers/service-worker/worker-client-id.https.html [ Pass Failure ]
 imported/w3c/web-platform-tests/xhr/event-timeout-order.htm [ Pass Failure ]
 
index 3f52a49..a75fa29 100644 (file)
@@ -1,3 +1,19 @@
+2019-04-30  Youenn Fablet  <youenn@apple.com>
+
+        Update WPT service-worker resource-timing test to use hosts[alt]
+        https://bugs.webkit.org/show_bug.cgi?id=197329
+
+        Reviewed by Chris Dumez.
+
+        Set alt server as 127.0.0.1.
+        Use hosts[alt][] instead of domains[www] to trigger a cross origin load.
+
+        * resources/config.json:
+        * web-platform-tests/service-workers/service-worker/resource-timing.https-expected.txt: Removed.
+        * web-platform-tests/service-workers/service-worker/resource-timing.sub.https-expected.txt: Added.
+        * web-platform-tests/service-workers/service-worker/resource-timing.sub.https.html: Renamed from LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.https.html.
+        * web-platform-tests/service-workers/service-worker/resources/resource-timing-iframe.sub.html:
+
 2019-04-29  Javier Fernandez  <jfernandez@igalia.com>
 
         line should not be broken before the first space after a word
index 2debe3b..04b2f82 100644 (file)
@@ -1,4 +1,5 @@
 {"browser_host": "localhost",
+ "alternate_hosts": { "alt": "127.0.0.1" },
  "ports":{"http":[8800, 8801],
           "https":[9443],
           "ws":[49001]},
diff --git a/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.https-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.https-expected.txt
deleted file mode 100644 (file)
index 8c00dd2..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-Blocked access to external URL https://www1.localhost:9443/service-workers/service-worker/resources/square.png
-Blocked access to external URL https://www1.localhost:9443/service-workers/service-worker/resources/missing.jpg
-Blocked access to external URL https://www1.localhost:9443/service-workers/service-worker/resources/square.png
-Blocked access to external URL https://www1.localhost:9443/service-workers/service-worker/resources/missing.jpg
-
-
-FAIL Controlled resource loads assert_greater_than: Generated response expected a number greater than 0 but got 0
-PASS Non-controlled resource loads 
-
diff --git a/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.sub.https-expected.txt b/LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/resource-timing.sub.https-expected.txt
new file mode 100644 (file)
index 0000000..c41c2b7
--- /dev/null
@@ -0,0 +1,5 @@
+
+
+FAIL Controlled resource loads assert_greater_than: Generated response expected a number greater than 0 but got 0
+PASS Non-controlled resource loads 
+
@@ -1,15 +1,14 @@
 <!DOCTYPE html>
 <script src="/resources/testharness.js"></script>
 <script src="/resources/testharnessreport.js"></script>
-<script src="/common/get-host-info.sub.js"></script>
 <script src="resources/test-helpers.sub.js"></script>
 <script>
 function resourceUrl(path) {
-    return get_host_info()['HTTPS_ORIGIN'] + base_path() + path;
+    return "https://{{host}}:{{ports[https][0]}}" + base_path() + path;
 }
 
 function crossOriginUrl(path) {
-    return get_host_info()['HTTPS_REMOTE_ORIGIN'] + base_path() + path;
+    return "https://{{hosts[alt][]}}:{{ports[https][0]}}" + base_path() + path;
 }
 
 function verify(options) {
index 4b62657..41bc2e7 100644 (file)
@@ -3,8 +3,8 @@
 <script src="dummy.js"></script>
 <script src="redirect.py?Redirect=empty.js"></script>
 <img src="square.png">
-<img src="https://{{domains[www1]}}:{{ports[https][0]}}/service-workers/service-worker/resources/square.png">
+<img src="https://{{hosts[alt][]}}:{{ports[https][0]}}/service-workers/service-worker/resources/square.png">
 <img src="missing.jpg">
-<img src="https://{{domains[www1]}}:{{ports[https][0]}}/service-workers/service-worker/resources/missing.jpg">
+<img src="https://{{hosts[alt][]}}:{{ports[https][0]}}/service-workers/service-worker/resources/missing.jpg">
 <img src='missing.jpg?SWRespondsWithFetch'>
 <script src='empty-worker.js'></script>