Changeset 268479 in webkit
- Timestamp:
- Oct 14, 2020 1:00:44 PM (4 years ago)
- Location:
- trunk
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r268476 r268479 1 2020-10-14 Alex Christensen <achristensen@webkit.org> 2 3 Disallow ports in file URLs 4 https://bugs.webkit.org/show_bug.cgi?id=217252 5 6 Reviewed by Darin Adler. 7 8 * fast/loader/file-URL-with-port-number-expected.txt: 9 * fast/loader/file-URL-with-port-number.html: 10 Update test to reflect this new behavior. The test was added in r24484 and 11 based on discussion in https://github.com/whatwg/url/issues/548 I've decided to try it and see if we can make this change. 12 1 13 2020-10-13 Simon Fraser <simon.fraser@apple.com> 2 14 -
trunk/LayoutTests/fast/loader/file-URL-with-port-number-expected.txt
r24484 r268479 1 1 This tests whether we can load a file URL with a port number in the URL. It should be ignored, and so the load should succeed. 2 2 3 SUCCESS: The subframe loaded.3 PASS: The subframe did not load. 4 4 5 5 -
trunk/LayoutTests/fast/loader/file-URL-with-port-number.html
r207162 r268479 1 1 <head> 2 2 <script> 3 4 function finishTest() 5 { 6 if (window.testRunner) 7 testRunner.notifyDone(); 8 } 9 3 10 function subframeLoaded() 4 11 { 5 document.getElementById("result").appendChild(document.createTextNode("SUCCESS: The subframe loaded.")); 6 if (window.testRunner) 7 testRunner.notifyDone(); 12 document.getElementById("result").appendChild(document.createTextNode("FAIL: The subframe loaded.")); 13 finishTest(); 14 } 15 16 function subframeError() 17 { 18 document.getElementById("result").appendChild(document.createTextNode("FAIL: The subframe onerror was called.")); 19 finishTest(); 20 } 21 22 function subframeDidNotLoad() 23 { 24 document.getElementById("result").appendChild(document.createTextNode("PASS: The subframe did not load.")); 25 finishTest(); 8 26 } 9 27 … … 20 38 var subframe = document.getElementById("subframe"); 21 39 subframe.onload = subframeLoaded; 40 subframe.onerror = subframeError; 22 41 subframe.contentWindow.location = subframeLocation; 42 setTimeout(subframeDidNotLoad, 100); 23 43 } 24 44 -
trunk/LayoutTests/imported/w3c/ChangeLog
r268477 r268479 1 2020-10-14 Alex Christensen <achristensen@webkit.org> 2 3 Disallow ports in file URLs 4 https://bugs.webkit.org/show_bug.cgi?id=217252 5 6 Reviewed by Darin Adler. 7 8 * web-platform-tests/url/a-element-expected.txt: 9 * web-platform-tests/url/a-element-xhtml-expected.txt: 10 * web-platform-tests/url/failure-expected.txt: 11 * web-platform-tests/url/url-constructor-expected.txt: 12 * web-platform-tests/url/url-setters-expected.txt: 13 1 14 2020-10-14 Youenn Fablet <youenn@apple.com> 2 15 -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-expected.txt
r267965 r268479 81 81 PASS Parsing: <madeupscheme:/example.com/> against <http://example.org/foo/bar> 82 82 PASS Parsing: <file:/example.com/> against <http://example.org/foo/bar> 83 FAIL Parsing: <file://example:1/> against <about:blank> assert_unreached: Expected URL to fail parsing Reached unreachable code 83 PASS Parsing: <file://example:1/> against <about:blank> 84 84 PASS Parsing: <file://example:test/> against <about:blank> 85 85 PASS Parsing: <file://example%/> against <about:blank> -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/a-element-xhtml-expected.txt
r267965 r268479 81 81 PASS Parsing: <madeupscheme:/example.com/> against <http://example.org/foo/bar> 82 82 PASS Parsing: <file:/example.com/> against <http://example.org/foo/bar> 83 FAIL Parsing: <file://example:1/> against <about:blank> assert_unreached: Expected URL to fail parsing Reached unreachable code 83 PASS Parsing: <file://example:1/> against <about:blank> 84 84 PASS Parsing: <file://example:test/> against <about:blank> 85 85 PASS Parsing: <file://example%/> against <about:blank> -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/failure-expected.txt
r267965 r268479 1 CONSOLE MESSAGE: Not allowed to load local resource: example:12 1 Blocked access to external URL http://./Y: 3 2 CONSOLE MESSAGE: Beacon API cannot load http://./Y: due to access control checks. … … 6 5 7 6 PASS Loading data… 8 FAIL URL's constructor's base argument: file://example:1/ should throw assert_throws_js: function "() => new URL("about:blank", test.input)" did notthrow9 FAIL URL's href: file://example:1/ should throw assert_throws_js: function "() => url.href = test.input" did notthrow10 FAIL XHR: file://example:1/ should throw assert_throws_dom: function "() => client.open("GET", test.input)" did notthrow7 PASS URL's constructor's base argument: file://example:1/ should throw 8 PASS URL's href: file://example:1/ should throw 9 PASS XHR: file://example:1/ should throw 11 10 PASS sendBeacon(): file://example:1/ should throw 12 11 FAIL Location's href: file://example:1/ should throw assert_throws_js: function "() => self[0].location = test.input" did not throw 13 FAIL window.open(): file://example:1/ should throw assert_throws_dom: function "() => self.open(test.input).close()" did notthrow12 PASS window.open(): file://example:1/ should throw 14 13 PASS URL's constructor's base argument: file://example:test/ should throw 15 14 PASS URL's href: file://example:test/ should throw -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-constructor-expected.txt
r267965 r268479 80 80 PASS Parsing: <madeupscheme:/example.com/> against <http://example.org/foo/bar> 81 81 PASS Parsing: <file:/example.com/> against <http://example.org/foo/bar> 82 FAIL Parsing: <file://example:1/> against <about:blank> assert_throws_js: function "function () { 83 bURL(expected.input, expected.base) 84 }" did not throw 82 PASS Parsing: <file://example:1/> against <about:blank> 85 83 PASS Parsing: <file://example:test/> against <about:blank> 86 84 PASS Parsing: <file://example%/> against <about:blank> -
trunk/LayoutTests/imported/w3c/web-platform-tests/url/url-setters-expected.txt
r268050 r268479 307 307 PASS <a>: Setting <http://example.net/>.host = '[::1.]' 308 308 PASS <area>: Setting <http://example.net/>.host = '[::1.]' 309 FAIL URL: Setting <file://y/>.host = 'x:123' assert_equals: expected "file://y/" but got "file://x:123/" 310 FAIL <a>: Setting <file://y/>.host = 'x:123' assert_equals: expected "file://y/" but got "file://x:123/" 311 FAIL <area>: Setting <file://y/>.host = 'x:123' assert_equals: expected "file://y/" but got "file://x:123/" 309 PASS URL: Setting <file://y/>.host = 'x:123' 310 PASS <a>: Setting <file://y/>.host = 'x:123' 311 PASS <area>: Setting <file://y/>.host = 'x:123' 312 312 PASS URL: Setting <file://y/>.host = 'loc%41lhost' 313 313 PASS <a>: Setting <file://y/>.host = 'loc%41lhost' -
trunk/Source/WTF/ChangeLog
r268476 r268479 1 2020-10-14 Alex Christensen <achristensen@webkit.org> 2 3 Disallow ports in file URLs 4 https://bugs.webkit.org/show_bug.cgi?id=217252 5 6 Reviewed by Darin Adler. 7 8 This matches Chrome and the URL specification. 9 Covered by newly passing web platform tests. 10 11 * wtf/URLParser.cpp: 12 (WTF::URLParser::parsePort): 13 1 14 2020-10-13 Simon Fraser <simon.fraser@apple.com> 2 15 -
trunk/Source/WTF/wtf/URLParser.cpp
r268362 r268479 2575 2575 bool URLParser::parsePort(CodePointIterator<CharacterType>& iterator) 2576 2576 { 2577 if (UNLIKELY(m_urlIsFile)) 2578 return false; 2579 2577 2580 ASSERT(*iterator == ':'); 2578 2581 auto colonIterator = iterator; -
trunk/Tools/ChangeLog
r268478 r268479 1 2020-10-14 Alex Christensen <achristensen@webkit.org> 2 3 Disallow ports in file URLs 4 https://bugs.webkit.org/show_bug.cgi?id=217252 5 6 Reviewed by Darin Adler. 7 8 * TestWebKitAPI/Tests/WTF/URLParser.cpp: 9 (TestWebKitAPI::TEST_F): 10 1 11 2020-10-14 Alexey Shvayka <shvaikalesh@gmail.com> 2 12 -
trunk/Tools/TestWebKitAPI/Tests/WTF/URLParser.cpp
r267963 r268479 1193 1193 checkURL("unknown://host:81", {"unknown", "", "", "host", 81, "", "", "", "unknown://host:81"}); 1194 1194 1195 checkURL("file://host:0", {"file", "", "", "host", 0, "/", "", "", "file://host:0/"}); 1196 checkURL("file://host:80", {"file", "", "", "host", 80, "/", "", "", "file://host:80/"}); 1197 checkURL("file://host:80/path", {"file", "", "", "host", 80, "/path", "", "", "file://host:80/path"}); 1198 checkURLDifferences("file://:80/path", 1199 {"", "", "", "", 0, "", "", "", "file://:80/path"}, 1200 {"file", "", "", "", 80, "/path", "", "", "file://:80/path"}); 1201 checkURLDifferences("file://:0/path", 1202 {"", "", "", "", 0, "", "", "", "file://:0/path"}, 1203 {"file", "", "", "", 0, "/path", "", "", "file://:0/path"}); 1195 checkURL("file://host/", {"file", "", "", "host", 0, "/", "", "", "file://host/"}); 1196 checkURL("file://host:", {"", "", "", "", 0, "", "", "", "file://host:"}); 1197 checkURL("file://host:0", {"", "", "", "", 0, "", "", "", "file://host:0"}); 1198 checkURL("file://host:80", {"", "", "", "", 0, "", "", "", "file://host:80"}); 1199 checkURL("file://host:80/path", {"", "", "", "", 0, "", "", "", "file://host:80/path"}); 1200 checkURL("file://:80/path", {"", "", "", "", 0, "", "", "", "file://:80/path"}); 1201 checkURL("file://:0/path", {"", "", "", "", 0, "", "", "", "file://:0/path"}); 1204 1202 1205 1203 checkURL("http://example.com:0000000000000077", {"http", "", "", "example.com", 77, "/", "", "", "http://example.com:77/"});
Note: See TracChangeset
for help on using the changeset viewer.