Changeset 220111 in webkit
- Timestamp:
- Aug 1, 2017 2:02:37 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 9 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r220110 r220111 1 2017-08-01 Youenn Fablet <youenn@apple.com> 2 3 Layout tests with 'https' suffix should be run over HTTPS 4 https://bugs.webkit.org/show_bug.cgi?id=174992 5 6 Reviewed by Chris Dumez. 7 8 Updating test to allow display insecure content as otherwise the test would not complete now that it is run over HTTPS. 9 Adding WK1 expected files as the warning message is not printed. 10 11 * http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt: 12 * http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https.html: 13 * platform/ios-wk1/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt: Added. 14 * platform/mac-wk1/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt: Added. 15 1 16 2017-08-01 Matt Lewis <jlewis3@apple.com> 2 17 -
trunk/LayoutTests/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https-expected.txt
r201753 r220111 1 CONSOLE MESSAGE: line 1: The page at about:srcdoc was allowed to display insecure content from http://localhost:8000/security/resources/post-origin-to-parent.html. 2 1 3 2 4 -
trunk/LayoutTests/http/tests/security/contentSecurityPolicy/upgrade-insecure-requests/iframe-upgrade.https.html
r212178 r220111 41 41 42 42 async_test(t => { 43 // WEBKIT change: updated the test to allow display of insecure content. 44 if (window.internals) 45 internals.settings.setAllowDisplayOfInsecureContent(true); 46 43 47 var iframe = document.createElement('iframe'); 44 48 iframe.srcdoc = "<a href='HTTP://localhost:8000/security/resources/post-origin-to-parent.html'>Navigate!</a>" + -
trunk/Tools/ChangeLog
r220109 r220111 1 2017-08-01 Youenn Fablet <youenn@apple.com> 2 3 Layout tests with 'https' suffix should be run over HTTPS 4 https://bugs.webkit.org/show_bug.cgi?id=174992 5 6 Reviewed by Chris Dumez. 7 8 Updating the test-name <-> uri conversion routines to use https when test names contain ".https." in them. 9 This covers WPT tests, WPT WebKit tests and HTTP layout tests. 10 Covered by corresponding unit tests. 11 12 * Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py: 13 (run_server): 14 * Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py: 15 (base_http_url): 16 (base_https_url): 17 (base_url): Deleted. 18 * Scripts/webkitpy/port/base.py: 19 (Port.to.web_platform_test_server_base_http_url): 20 (Port.to): 21 (Port.to.web_platform_test_server_base_https_url): 22 (Port.to.web_platform_test_server_base_url): Deleted. 23 * Scripts/webkitpy/port/driver.py: 24 (Driver.__init__): 25 (Driver.wpt_test_path_to_uri): 26 (Driver): 27 (Driver.http_test_path_to_uri): 28 (Driver.test_to_uri): 29 (Driver.uri_to_test): 30 * Scripts/webkitpy/port/driver_unittest.py: 31 (DriverTest.test_test_to_uri): 32 (DriverTest.test_uri_to_test): 33 1 34 2017-07-26 Jiewen Tan <jiewen_tan@apple.com> 2 35 -
trunk/Tools/Scripts/webkitpy/layout_tests/servers/run_webkit_httpd.py
r217276 r220111 69 69 70 70 if options.web_platform_test_server: 71 print "Starting web-platform-tests server on <%s> " % web_platform_test_server.base_url(port)71 print "Starting web-platform-tests server on <%s> and <%s>" % (web_platform_test_server.base_http_url(port), web_platform_test_server.base_https_url(port)) 72 72 port.start_web_platform_test_server() 73 73 -
trunk/Tools/Scripts/webkitpy/layout_tests/servers/web_platform_test_server.py
r217913 r220111 46 46 47 47 48 def base_ url(port_obj):48 def base_http_url(port_obj): 49 49 config = wpt_config_json(port_obj) 50 50 if not config: … … 54 54 ports = config["ports"] 55 55 return "http://" + config["host"] + ":" + str(ports["http"][0]) + "/" 56 57 58 def base_https_url(port_obj): 59 config = wpt_config_json(port_obj) 60 if not config: 61 # This should only be hit by webkitpy unit tests 62 _log.debug("No WPT config file found") 63 return "https://localhost:9443/" 64 ports = config["ports"] 65 return "https://" + config["host"] + ":" + str(ports["https"][0]) + "/" 56 66 57 67 -
trunk/Tools/Scripts/webkitpy/port/base.py
r218482 r220111 1018 1018 return web_platform_test_server.doc_root(self) + self.TEST_PATH_SEPARATOR 1019 1019 1020 def web_platform_test_server_base_url(self): 1021 return web_platform_test_server.base_url(self) 1020 def web_platform_test_server_base_http_url(self): 1021 return web_platform_test_server.base_http_url(self) 1022 1023 def web_platform_test_server_base_https_url(self): 1024 return web_platform_test_server.base_https_url(self) 1022 1025 1023 1026 def http_server_supports_ipv6(self): -
trunk/Tools/Scripts/webkitpy/port/driver.py
r218482 r220111 168 168 169 169 self.web_platform_test_server_doc_root = self._port.web_platform_test_server_doc_root() 170 self.web_platform_test_server_base_url = self._port.web_platform_test_server_base_url() 170 self.web_platform_test_server_base_http_url = self._port.web_platform_test_server_base_http_url() 171 self.web_platform_test_server_base_https_url = self._port.web_platform_test_server_base_https_url() 171 172 172 173 def __del__(self): … … 267 268 return test_name.startswith(self.web_platform_test_server_doc_root) 268 269 270 def wpt_test_path_to_uri(self, path): 271 return self.web_platform_test_server_base_https_url + path if ".https." in path else self.web_platform_test_server_base_http_url + path 272 273 def http_test_path_to_uri(self, path): 274 return "https://127.0.0.1:8443/" + path if path.startswith("ssl") or ".https." in path else "http://127.0.0.1:8000/" + path 275 269 276 def test_to_uri(self, test_name): 270 277 """Convert a test name to a URI.""" 271 278 if self.is_web_platform_test(test_name): 272 return self.w eb_platform_test_server_base_url + test_name[len(self.web_platform_test_server_doc_root):]279 return self.wpt_test_path_to_uri(test_name[len(self.web_platform_test_server_doc_root):]) 273 280 if self.is_webkit_specific_web_platform_test(test_name): 274 return self.w eb_platform_test_server_base_url + self.WEBKIT_WEB_PLATFORM_TEST_SERVER_ROUTE + test_name[len(self.WEBKIT_SPECIFIC_WEB_PLATFORM_TEST_SUBDIR):]281 return self.wpt_test_path_to_uri(self.WEBKIT_WEB_PLATFORM_TEST_SERVER_ROUTE + test_name[len(self.WEBKIT_SPECIFIC_WEB_PLATFORM_TEST_SUBDIR):]) 275 282 276 283 if not self.is_http_test(test_name): 277 284 return path.abspath_to_uri(self._port.host.platform, self._port.abspath_for_test(test_name)) 278 285 279 relative_path = test_name[len(self.HTTP_DIR):] 280 281 # TODO(dpranke): remove the SSL reference? 282 if relative_path.startswith("ssl/"): 283 return "https://127.0.0.1:8443/" + relative_path 284 return "http://127.0.0.1:8000/" + relative_path 286 return self.http_test_path_to_uri(test_name[len(self.HTTP_DIR):]) 285 287 286 288 def uri_to_test(self, uri): … … 297 299 prefix += '/' 298 300 return uri[len(prefix):] 299 if uri.startswith(self.web_platform_test_server_base_url + self.WEBKIT_WEB_PLATFORM_TEST_SERVER_ROUTE): 300 return uri.replace(self.web_platform_test_server_base_url + self.WEBKIT_WEB_PLATFORM_TEST_SERVER_ROUTE, self.WEBKIT_SPECIFIC_WEB_PLATFORM_TEST_SUBDIR) 301 if uri.startswith(self.web_platform_test_server_base_url): 302 return uri.replace(self.web_platform_test_server_base_url, self.web_platform_test_server_doc_root) 301 if uri.startswith(self.web_platform_test_server_base_http_url + self.WEBKIT_WEB_PLATFORM_TEST_SERVER_ROUTE): 302 return uri.replace(self.web_platform_test_server_base_http_url + self.WEBKIT_WEB_PLATFORM_TEST_SERVER_ROUTE, self.WEBKIT_SPECIFIC_WEB_PLATFORM_TEST_SUBDIR) 303 if uri.startswith(self.web_platform_test_server_base_https_url + self.WEBKIT_WEB_PLATFORM_TEST_SERVER_ROUTE): 304 return uri.replace(self.web_platform_test_server_base_https_url + self.WEBKIT_WEB_PLATFORM_TEST_SERVER_ROUTE, self.WEBKIT_SPECIFIC_WEB_PLATFORM_TEST_SUBDIR) 305 if uri.startswith(self.web_platform_test_server_base_http_url): 306 return uri.replace(self.web_platform_test_server_base_http_url, self.web_platform_test_server_doc_root) 307 if uri.startswith(self.web_platform_test_server_base_https_url): 308 return uri.replace(self.web_platform_test_server_base_https_url, self.web_platform_test_server_doc_root) 303 309 if uri.startswith("http://"): 304 310 return uri.replace('http://127.0.0.1:8000/', self.HTTP_DIR) -
trunk/Tools/Scripts/webkitpy/port/driver_unittest.py
r218482 r220111 119 119 self.assertEqual(driver.test_to_uri('http/tests/ssl/bar.html'), 'https://127.0.0.1:8443/ssl/bar.html') 120 120 self.assertEqual(driver.test_to_uri('imported/w3c/web-platform-tests/foo/bar.html'), 'http://localhost:8800/foo/bar.html') 121 self.assertEqual(driver.test_to_uri('imported/w3c/web-platform-tests/foo/bar.https.html'), 'https://localhost:9443/foo/bar.https.html') 121 122 self.assertEqual(driver.test_to_uri('http/wpt/bar2.html'), 'http://localhost:8800/WebKit/bar2.html') 123 self.assertEqual(driver.test_to_uri('http/wpt/bar2.https.html'), 'https://localhost:9443/WebKit/bar2.https.html') 122 124 123 125 def test_uri_to_test(self): … … 127 129 self.assertEqual(driver.uri_to_test('http://127.0.0.1:8000/foo.html'), 'http/tests/foo.html') 128 130 self.assertEqual(driver.uri_to_test('https://127.0.0.1:8443/ssl/bar.html'), 'http/tests/ssl/bar.html') 131 self.assertEqual(driver.uri_to_test('https://127.0.0.1:8443/ssl/bar.https.html'), 'http/tests/ssl/bar.https.html') 129 132 self.assertEqual(driver.uri_to_test('http://localhost:8800/foo/bar.html'), 'imported/w3c/web-platform-tests/foo/bar.html') 130 133 self.assertEqual(driver.uri_to_test('http://localhost:8800/WebKit/bar2.html'), 'http/wpt/bar2.html') 134 self.assertEqual(driver.uri_to_test('https://localhost:9443/WebKit/bar2.https.html'), 'http/wpt/bar2.https.html') 131 135 132 136 def test_read_block(self):
Note: See TracChangeset
for help on using the changeset viewer.