HTTP tests with 'https' suffix are only run over HTTPS for WK2, not WK1
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Aug 2017 04:19:10 +0000 (04:19 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 3 Aug 2017 04:19:10 +0000 (04:19 +0000)
https://bugs.webkit.org/show_bug.cgi?id=175089

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

Tools:

* DumpRenderTree/TestOptions.mm:
(TestOptions::TestOptions): Using absolutePath if available.
* DumpRenderTree/mac/DumpRenderTree.mm:
(computeTestURL): Removing http/tests/ specific URL computation.
* Scripts/webkitpy/port/driver.py:
(Driver._command_from_driver_input): Making webkitpy passing HTTP urls for HTTP served tests to all test runners, including WK1.

LayoutTests:

Removing no longer needed expectations.

* platform/ios-wk1/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt: Removed.
* platform/mac-wk1/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt: Removed.

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

LayoutTests/ChangeLog
LayoutTests/platform/ios-wk1/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt [deleted file]
LayoutTests/platform/mac-wk1/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt [deleted file]
Tools/ChangeLog
Tools/DumpRenderTree/TestOptions.mm
Tools/DumpRenderTree/mac/DumpRenderTree.mm
Tools/Scripts/webkitpy/port/driver.py

index 8ca46225baba4d859cb75184093006c7edac7afa..6faf1e7900f238d1dff1932063d5ee061b997a5c 100644 (file)
@@ -1,3 +1,15 @@
+2017-08-02  Youenn Fablet  <youenn@apple.com>
+
+        HTTP tests with 'https' suffix are only run over HTTPS for WK2, not WK1
+        https://bugs.webkit.org/show_bug.cgi?id=175089
+
+        Reviewed by Chris Dumez.
+
+        Removing no longer needed expectations.
+
+        * platform/ios-wk1/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt: Removed.
+        * platform/mac-wk1/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt: Removed.
+
 2017-08-02  Matt Lewis  <jlewis3@apple.com>
 
         Marked http/tests/appcache/deferred-events-delete-while-raising-timer.html as flaky.
diff --git a/LayoutTests/platform/ios-wk1/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt b/LayoutTests/platform/ios-wk1/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt
deleted file mode 100644 (file)
index 17fdc16..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-PASS Same-host frames are upgraded. 
-PASS Cross-host frames are upgraded. 
-PASS Upgrade policy does NOT cascade to nested, cross-host frames. 
-
diff --git a/LayoutTests/platform/mac-wk1/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt b/LayoutTests/platform/mac-wk1/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt
deleted file mode 100644 (file)
index 17fdc16..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-PASS Same-host frames are upgraded. 
-PASS Cross-host frames are upgraded. 
-PASS Upgrade policy does NOT cascade to nested, cross-host frames. 
-
index b28dfe3b50a7b390a1d1ed4f6464de319146bd39..b76077319136f52f41371edfb169ae78362e327f 100644 (file)
@@ -1,3 +1,17 @@
+2017-08-02  Youenn Fablet  <youenn@apple.com>
+
+        HTTP tests with 'https' suffix are only run over HTTPS for WK2, not WK1
+        https://bugs.webkit.org/show_bug.cgi?id=175089
+
+        Reviewed by Chris Dumez.
+
+        * DumpRenderTree/TestOptions.mm:
+        (TestOptions::TestOptions): Using absolutePath if available.
+        * DumpRenderTree/mac/DumpRenderTree.mm:
+        (computeTestURL): Removing http/tests/ specific URL computation.
+        * Scripts/webkitpy/port/driver.py:
+        (Driver._command_from_driver_input): Making webkitpy passing HTTP urls for HTTP served tests to all test runners, including WK1.
+
 2017-08-02  Lucas Forschler  <lforschler@apple.com>
 
         download-built-product should allow for a proxy option
index 911da37914eff560a9283aae356beddc8e318c29..bb9ca840af2802905b30b9859721547462ae995e 100644 (file)
@@ -44,13 +44,11 @@ static bool parseBooleanTestHeaderValue(const std::string& value)
 TestOptions::TestOptions(NSURL *testURL, const TestCommand& command)
 {
     std::string path = command.absolutePath;
-    if (path.empty() && [testURL isFileURL])
-        path = [testURL fileSystemRepresentation];
-    else
-        path = command.pathOrURL;
-
-    if (path.empty())
-        return;
+    if (path.empty()) {
+        path = [testURL isFileURL] ? [testURL fileSystemRepresentation] : command.pathOrURL;
+        if (path.empty())
+            return;
+    }
 
     std::string options;
     std::ifstream testFile(path.data());
index 1c6d6bc65b7f7f69823f279701427a1580e5667a..df2ec0895e557f313dc17591506e80cc548a73af 100644 (file)
@@ -1907,28 +1907,7 @@ static NSURL *computeTestURL(NSString *pathOrURLString, NSString **relativeTestP
         return [NSURL fileURLWithPath:absolutePath];
 
     *relativeTestPath = [absolutePath substringFromIndex:NSMaxRange(layoutTestsRange)];
-
-    // Convert file URLs in LayoutTests/http/tests to HTTP URLs, except for file URLs in LayoutTests/http/tests/local.
-
-    NSRange httpTestsRange = [absolutePath rangeOfString:@"/LayoutTests/http/tests/"];
-    if (httpTestsRange.location == NSNotFound || [absolutePath rangeOfString:@"/LayoutTests/http/tests/local/"].location != NSNotFound)
-        return [NSURL fileURLWithPath:absolutePath];
-
-    auto components = adoptNS([[NSURLComponents alloc] init]);
-    [components setPath:[absolutePath substringFromIndex:NSMaxRange(httpTestsRange) - 1]];
-    [components setHost:@"127.0.0.1"];
-
-    // Paths under /ssl/ should be loaded using HTTPS.
-    BOOL isSecure = [[components path] hasPrefix:@"/ssl/"];
-    if (isSecure) {
-        [components setScheme:@"https"];
-        [components setPort:@(8443)];
-    } else {
-        [components setScheme:@"http"];
-        [components setPort:@(8000)];
-    }
-
-    return [components URL];
+    return [NSURL fileURLWithPath:absolutePath];
 }
 
 static void runTest(const string& inputLine)
index b750323f78326487b10cd1c17c54740b153a95c0..4e305a4032c12aac54be40a18d37f54fc1c60e4d 100644 (file)
@@ -485,7 +485,7 @@ class Driver(object):
         # FIXME: performance tests pass in full URLs instead of test names.
         if driver_input.test_name.startswith('http://') or driver_input.test_name.startswith('https://')  or driver_input.test_name == ('about:blank'):
             command = driver_input.test_name
-        elif self.is_web_platform_test(driver_input.test_name) or self.is_webkit_specific_web_platform_test(driver_input.test_name) or (self.is_http_test(driver_input.test_name) and (self._port.get_option('webkit_test_runner') or sys.platform == "cygwin")):
+        elif self.is_web_platform_test(driver_input.test_name) or self.is_webkit_specific_web_platform_test(driver_input.test_name) or self.is_http_test(driver_input.test_name):
             command = self.test_to_uri(driver_input.test_name)
             command += "'--absolutePath'"
             command += self._port.abspath_for_test(driver_input.test_name, self._target_host)