Remove www1/www2 URLs from service worker tests
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Feb 2018 02:29:57 +0000 (02:29 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 8 Feb 2018 02:29:57 +0000 (02:29 +0000)
https://bugs.webkit.org/show_bug.cgi?id=182548

Patch by Youenn Fablet <youenn@apple.com> on 2018-02-07
Reviewed by Chris Dumez.

LayoutTests/imported/w3c:

* web-platform-tests/service-workers/service-worker/http-to-https-redirect-and-register.https-expected.txt:
* web-platform-tests/service-workers/service-worker/http-to-https-redirect-and-register.https.html:
* web-platform-tests/service-workers/service-worker/update-bytecheck.https.html:

LayoutTests:

* TestExpectations:

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

LayoutTests/ChangeLog
LayoutTests/TestExpectations
LayoutTests/imported/w3c/ChangeLog
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/http-to-https-redirect-and-register.https-expected.txt
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/http-to-https-redirect-and-register.https.html
LayoutTests/imported/w3c/web-platform-tests/service-workers/service-worker/update-bytecheck.https.html

index 7869d17..f1c1baf 100644 (file)
@@ -1,3 +1,12 @@
+2018-02-07  Youenn Fablet  <youenn@apple.com>
+
+        Remove www1/www2 URLs from service worker tests
+        https://bugs.webkit.org/show_bug.cgi?id=182548
+
+        Reviewed by Chris Dumez.
+
+        * TestExpectations:
+
 2018-02-07  John Wilander  <wilander@apple.com>
 
         Switch testRunner.installStatisticsDidModifyDataRecordsCallback() to testRunner.installStatisticsDidScanDataRecordsCallback() in two tests
index 14a3ac4..be63c56 100644 (file)
@@ -153,7 +153,6 @@ imported/w3c/web-platform-tests/service-workers/service-worker/import-scripts-re
 
 # Skip service worker tests that are timing out.
 imported/w3c/web-platform-tests/fetch/api/abort/general-serviceworker.https.html [ Skip ]
-imported/w3c/web-platform-tests/service-workers/service-worker/http-to-https-redirect-and-register.https.html [ Skip ]
 imported/w3c/web-platform-tests/service-workers/service-worker/performance-timeline.https.html [ Skip ]
 imported/w3c/web-platform-tests/service-workers/service-worker/postmessage.https.html [ Skip ]
 imported/w3c/web-platform-tests/service-workers/service-worker/respond-with-body-accessed-response.https.html [ Skip ]
index 571ff33..0c88788 100644 (file)
@@ -1,3 +1,14 @@
+2018-02-07  Youenn Fablet  <youenn@apple.com>
+
+        Remove www1/www2 URLs from service worker tests
+        https://bugs.webkit.org/show_bug.cgi?id=182548
+
+        Reviewed by Chris Dumez.
+
+        * web-platform-tests/service-workers/service-worker/http-to-https-redirect-and-register.https-expected.txt:
+        * web-platform-tests/service-workers/service-worker/http-to-https-redirect-and-register.https.html:
+        * web-platform-tests/service-workers/service-worker/update-bytecheck.https.html:
+
 2018-02-07  Chris Dumez  <cdumez@apple.com>
 
         IndexedDB in service workers is using a memory backed store
index 8ff63fe..02a5a6e 100644 (file)
@@ -1,7 +1,4 @@
-Blocked access to external URL http://www2.localhost:8800/service-workers/service-worker/resources/redirect.py?Redirect=https%3A%2F%2Flocalhost%3A9443%2Fservice-workers%2Fservice-worker%2Fresources%2Fhttp-to-https-redirect-and-register-iframe.html
 
-Harness Error (TIMEOUT), message = null
-
-TIMEOUT register on a secure page after redirect from an non-secure url Test timed out
-NOTRUN register on a non-secure page after redirect from an non-secure url 
+PASS register on a secure page after redirect from an non-secure url 
+FAIL register on a non-secure page after redirect from an non-secure url assert_equals: expected "FAIL: SecurityError" but got "OK"
 
index d78b23a..d1c6678 100644 (file)
@@ -8,11 +8,13 @@
 <script>
 'use strict';
 
+var host_info = get_host_info();
+
 // Loads a non-secure url in a new window, which redirects to |target_url|.
 // That page then registers a service worker, and messages back with the result.
 // Returns a promise that resolves with the result.
 function redirect_and_register(target_url) {
-  var redirect_url = get_host_info()['UNAUTHENTICATED_ORIGIN'] + base_path() +
+  var redirect_url = host_info.HTTP_REMOTE_ORIGIN + base_path() +
     'resources/redirect.py?Redirect=';
   var child = window.open(redirect_url + encodeURIComponent(target_url));
   return new Promise(resolve => {
@@ -35,7 +37,7 @@ promise_test(function(t) {
   }, 'register on a secure page after redirect from an non-secure url');
 
 promise_test(function(t) {
-    var target_url = get_host_info()['UNAUTHENTICATED_ORIGIN'] + base_path() +
+    var target_url = host_info.HTTP_REMOTE_ORIGIN + base_path() +
       'resources/http-to-https-redirect-and-register-iframe.html';
 
     return redirect_and_register(target_url)
index 6e4c6ec..ec3d15a 100644 (file)
@@ -5,6 +5,7 @@
 <script src="resources/testharness-helpers.js"></script>
 <script src="/resources/testharnessreport.js"></script>
 <script src="resources/test-helpers.sub.js"></script>
+<script src="/common/get-host-info.sub.js"></script>
 <script>
 
 /*
@@ -26,11 +27,12 @@ const settings = [{cors: false, main: 'default', imported: 'default'},
                   {cors: true,  main: 'time',    imported: 'default'},
                   {cors: true,  main: 'time',    imported: 'time'   }];
 
+const host_info = get_host_info();
 settings.reduce((p, s) => {
   return p.then(promise_test(function(t) {
     var path = !s.cors ? ''
-                       : 'https://www1.web-platform.test:8443/' +
-                         'service-workers/service-worker/resources/';
+                       : host_info.HTTPS_REMOTE_ORIGIN +
+                         '/service-workers/service-worker/resources/';
     var script = 'resources/bytecheck-worker.py' +
                  '?main=' + s.main +
                  '&imported=' + s.imported +