Changeset 51799 in webkit
- Timestamp:
- Dec 7, 2009 2:50:15 PM (14 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r51798 r51799 1 2009-12-07 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Darin Adler. 4 5 Some changes to ValidityState-typeMismatch-url.html. 6 https://bugs.webkit.org/show_bug.cgi?id=29913 7 8 - Add more test cases 9 Username, IPv6 address, mailto:, file:, tel:, fragment, and IDN. 10 - Handle difference between KURL and KURLGoogle 11 12 * fast/forms/ValidityState-typeMismatch-url-expected.txt: 13 * fast/forms/script-tests/ValidityState-typeMismatch-url.js: 14 1 15 2009-12-07 Darin Fisher <darin@chromium.org> 2 16 -
trunk/LayoutTests/fast/forms/ValidityState-typeMismatch-url-expected.txt
r48318 r51799 5 5 6 6 PASS http://www.google.com is a correct valid url. 7 PASS http://foo:bar@www.google.com:80 is a correct valid url. 7 8 PASS http://localhost is a correct valid url. 8 9 PASS http://127.0.0.1 is a correct valid url. 10 PASS http://[0000:0000:0000:0000:0000:0000:7f00:0001]/ is a correct valid url. 11 PASS http://[0000:0000:0000:0000:0000:0000:127.0.0.1]/ is a correct valid url. 12 PASS http://[::7f00:0001]/ is a correct valid url. 13 PASS http://[1::2:3]/ is a correct valid url. 14 PASS http://[0000:0::ffff:10.0.0.1]/ is a correct valid url. 9 15 PASS http://a is a correct valid url. 10 16 PASS http://www.google.com/search?rls=en&q=WebKit&ie=UTF-8&oe=UTF-8 is a correct valid url. 11 17 PASS ftp://ftp.myhost.com is a correct valid url. 12 18 PASS ssh://ssh.myhost.com is a correct valid url. 19 PASS mailto:tkent@chromium.org is a correct valid url. 20 PASS mailto:tkent@chromium.org?body=hello is a correct valid url. 21 PASS file:///Users/tkent/.zshrc is a correct valid url. 22 PASS file:///C:/human.sys is a correct valid url. 23 PASS tel:+1-800-12345;ext=9999 is a correct valid url. 24 PASS tel:03(1234)5678 is a correct valid url. 13 25 PASS somescheme://ssh.myhost.com is a correct valid url. 14 26 PASS http://a/\/''*<>/ is a correct valid url. 15 27 PASS http://a/dfs/kds@sds is a correct valid url. 16 28 PASS http://a.a:1/search?a&b is a correct valid url. 29 PASS http://www.google.com/#top is a correct valid url. 30 PASS http://テスト。jp/パス?名前=値 is a correct valid url. 17 31 PASS www.google.com is a correct invalid url. 18 32 PASS 127.0.0.1 is a correct invalid url. 19 33 PASS .com is a correct invalid url. 20 PASS http://www.g**gle.com is a correct invalid url.21 34 PASS http://www.google.com:aaaa is a correct invalid url. 22 PASS http:// www.google.com is a correct invalid url.23 PASS http://www .google.com is a correct invalid url.24 PASS http://www. google. com is a correct invalid url.25 35 PASS :// is a correct invalid url. 26 36 PASS /http://www.google.com is a correct invalid url. 27 37 PASS ----ftp://a is a correct invalid url. 28 38 PASS scheme//a is a correct invalid url. 39 PASS http://[v8.:::]/ is a correct invalid url. 40 PASS http:// www.google.com is a correct invalid url. 41 PASS http://www .google.com is a correct invalid url. 42 PASS http://www. google. com is a correct invalid url. 29 43 PASS http://host+ is a correct invalid url. 30 44 PASS http://myurl! is a correct invalid url. -
trunk/LayoutTests/fast/forms/script-tests/ValidityState-typeMismatch-url.js
r48552 r51799 12 12 } 13 13 14 function expectValid(value) { 15 check(value, false); 16 } 17 18 function expectInvalid(value) { 19 check(value, true); 20 } 21 14 22 var i = document.createElement('input'); 15 23 i.type = 'url'; 16 24 17 25 // Valid values 18 check('http://www.google.com', false); 19 check('http://localhost', false); 20 check('http://127.0.0.1', false); 21 check('http://a', false); 22 check('http://www.google.com/search?rls=en&q=WebKit&ie=UTF-8&oe=UTF-8', false); 23 check('ftp://ftp.myhost.com', false); 24 check('ssh://ssh.myhost.com', false); 25 check('somescheme://ssh.myhost.com', false); 26 check('http://a/\\\/\'\'*<>/', false); 27 check('http://a/dfs/\kds@sds', false); 28 check('http://a.a:1/search?a&b', false); 26 expectValid('http://www.google.com'); 27 expectValid('http://foo:bar@www.google.com:80'); 28 expectValid('http://localhost'); 29 expectValid('http://127.0.0.1'); 30 expectValid('http://[0000:0000:0000:0000:0000:0000:7f00:0001]/'); 31 expectValid('http://[0000:0000:0000:0000:0000:0000:127.0.0.1]/'); 32 expectValid('http://[::7f00:0001]/'); 33 expectValid('http://[1::2:3]/'); 34 expectValid('http://[0000:0::ffff:10.0.0.1]/'); 35 expectValid('http://a'); 36 expectValid('http://www.google.com/search?rls=en&q=WebKit&ie=UTF-8&oe=UTF-8'); 37 expectValid('ftp://ftp.myhost.com'); 38 expectValid('ssh://ssh.myhost.com'); 39 expectValid('mailto:tkent@chromium.org'); 40 expectValid('mailto:tkent@chromium.org?body=hello'); 41 expectValid('file:///Users/tkent/.zshrc'); 42 expectValid('file:///C:/human.sys'); 43 expectValid('tel:+1-800-12345;ext=9999'); 44 expectValid('tel:03(1234)5678'); 45 expectValid('somescheme://ssh.myhost.com'); 46 expectValid('http://a/\\\/\'\'*<>/'); 47 expectValid('http://a/dfs/\kds@sds'); 48 expectValid('http://a.a:1/search?a&b'); 49 expectValid('http://www.google.com/#top'); 50 expectValid('http://\u30C6\u30B9\u30C8\u3002jp/\u30D1\u30B9?\u540D\u524D=\u5024'); 29 51 30 52 // Invalid values 31 check('www.google.com', true); 32 check('127.0.0.1', true); 33 check('.com', true); 34 check('http://www.g**gle.com', true); 35 check('http://www.google.com:aaaa', true); 36 check('http:// www.google.com', true); 37 check('http://www .google.com', true); 38 check('http://www. google. com', true); 39 check('://', true); 40 check('/http://www.google.com', true); 41 check('----ftp://a', true); 42 check('scheme//a', true); 43 check('http://host+', true); 44 check('http://myurl!', true); 53 expectInvalid('www.google.com'); 54 expectInvalid('127.0.0.1'); 55 expectInvalid('.com'); 56 expectInvalid('http://www.google.com:aaaa'); 57 expectInvalid('://'); 58 expectInvalid('/http://www.google.com'); 59 expectInvalid('----ftp://a'); 60 expectInvalid('scheme//a'); 61 expectInvalid('http://[v8.:::]/'); 62 63 // KURL's host name restriction is stricter than RFC 3986. KURLGoogle is not. 64 i.value = 'http://www.g**gle.com' 65 var strictHost = i.validity.typeMismatch; 66 if (strictHost) { 67 expectInvalid('http:// www.google.com'); 68 expectInvalid('http://www .google.com'); 69 expectInvalid('http://www. google. com'); 70 expectInvalid('http://host+'); 71 expectInvalid('http://myurl!'); 72 } else { 73 expectValid('http:// www.google.com'); 74 expectValid('http://www .google.com'); 75 expectValid('http://www. google. com'); 76 expectValid('http://host+'); 77 expectValid('http://myurl!'); 78 } 45 79 46 80 var successfullyParsed = true; -
trunk/WebCore/ChangeLog
r51796 r51799 1 2009-12-07 Kent Tamura <tkent@chromium.org> 2 3 Reviewed by Darin Adler. 4 5 Fix a bug that KURL rejects a host name which has an IPv4 address 6 inside an IPv6 form like [::127.0.0.1]. 7 https://bugs.webkit.org/show_bug.cgi?id=29913 8 9 * platform/KURL.cpp: 10 (WebCore::characterClassTable): Add IPv6Char to '.'. 11 1 12 2009-12-07 Brady Eidson <beidson@apple.com> 2 13 -
trunk/WebCore/platform/KURL.cpp
r51703 r51799 103 103 /* 44 , */ UserInfoChar, 104 104 /* 45 - */ SchemeChar | UserInfoChar | HostnameChar, 105 /* 46 . */ SchemeChar | UserInfoChar | HostnameChar ,105 /* 46 . */ SchemeChar | UserInfoChar | HostnameChar | IPv6Char, 106 106 /* 47 / */ PathSegmentEndChar, 107 107 /* 48 0 */ SchemeChar | UserInfoChar | HostnameChar | IPv6Char,
Note: See TracChangeset
for help on using the changeset viewer.