Changeset 57712 in webkit
- Timestamp:
- Apr 15, 2010 7:50:21 PM (14 years ago)
- Location:
- trunk/LayoutTests
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r57711 r57712 1 2010-04-15 Adam Barth <abarth@webkit.org> 2 3 Reviewed by Jeremy Orlow. 4 5 Clean up unicode URL tests cases 6 https://bugs.webkit.org/show_bug.cgi?id=37678 7 8 When we started writing these URL tests, I didn't understand how to 9 handle the unicodes test cases properly. With a bunch of help (and a 10 pointer to http://rishida.net/tools/conversion/), I've fixed these to 11 be more or less faithful to the original unit tests. 12 13 * fast/url/anchor-expected.txt: 14 * fast/url/query-expected.txt: 15 * fast/url/script-tests/anchor.js: 16 * fast/url/script-tests/query.js: 17 * fast/url/script-tests/standard-url.js: 18 * fast/url/script-tests/trivial.js: 19 - Updated this test to use the shared implementations 20 - Also, removed assumptions about the base URL. 21 * fast/url/standard-url-expected.txt: 22 * fast/url/trivial-expected.txt: 23 1 24 2010-04-15 Adam Barth <abarth@webkit.org> 2 25 -
trunk/LayoutTests/fast/url/anchor-expected.txt
r57502 r57712 6 6 FAIL canonicalize('http://www.example.com/#hello, world') should be http://www.example.com/#hello, world. Was http://www.example.com/#hello,%20world. 7 7 FAIL canonicalize('http://www.example.com/#©') should be http://www.example.com/#©. Was http://www.example.com/#%C2%A9. 8 FAIL canonicalize('http://www.example.com/# ðss') should be http://www.example.com/#ðss. Was http://www.example.com/#%F0%90%26%23140%3B%26%23128%3Bss.8 FAIL canonicalize('http://www.example.com/#𐌀ss') should be http://www.example.com/#𐌀ss. Was http://www.example.com/#%26%2366304%3Bss. 9 9 PASS canonicalize('http://www.example.com/#%41%a') is 'http://www.example.com/#%41%a' 10 FAIL canonicalize('http://www.example.com/# Â') should be http://www.example.com/#�. Was http://www.example.com/#%C2.11 FAIL canonicalize('http://www.example.com/#a ï·') should be http://www.example.com/#a�. Was http://www.example.com/#a%EF%B7%90.10 FAIL canonicalize('http://www.example.com/#\ud800\u597d') should be http://www.example.com/#�好. Was http://www.example.com/#%26%2355296%3B%26%2322909%3B. 11 FAIL canonicalize('http://www.example.com/#a\uFDD0') should be http://www.example.com/#a. Was http://www.example.com/#a%26%2364976%3B. 12 12 FAIL canonicalize('http://www.example.com/#asdf#qwer') should be http://www.example.com/#asdf#qwer. Was http://www.example.com/#asdf%23qwer. 13 13 FAIL canonicalize('http://www.example.com/##asdf') should be http://www.example.com/##asdf. Was http://www.example.com/#%23asdf. -
trunk/LayoutTests/fast/url/query-expected.txt
r57501 r57712 6 6 PASS canonicalize('http://www.example.com/?foo=bar') is 'http://www.example.com/?foo=bar' 7 7 PASS canonicalize('http://www.example.com/?as?df') is 'http://www.example.com/?as?df' 8 FAIL canonicalize('http://www.example.com/?as#df') should be http://www.example.com/?as%23df. Was http://www.example.com/?as#df. 9 FAIL canonicalize('http://www.example.com/?hello bye') should be http://www.example.com/?%02hello%7F%20bye. Was http://www.example.com/?hello%7F%20bye. 8 FAIL canonicalize('http://www.example.com/?\x02hello bye') should be http://www.example.com/?%02hello%7F%20bye. Was http://www.example.com/?hello%7F%20bye. 10 9 PASS canonicalize('http://www.example.com/?%40%41123') is 'http://www.example.com/?%40%41123' 11 PASS canonicalize('http://www.example.com/?q= ä½ å¥½') is 'http://www.example.com/?q=%E4%BD%A0%E5%A5%BD'12 FAIL canonicalize('http://www.example.com/?q=íí') should be http://www.example.com/?q=%EF%BF%BD%EF%BF%BD. Was http://www.example.com/?q=%ED%ED. 10 PASS canonicalize('http://www.example.com/?q=你好') is 'http://www.example.com/?q=%26%2320320%3B%26%2322909%3B' 11 PASS canonicalize('http://www.example.com/?q=\ud800\ud800') is 'http://www.example.com/?q=%26%2355296%3B%26%2355296%3B' 13 12 PASS canonicalize('http://www.example.com/?q=<asdf>') is 'http://www.example.com/?q=%3Casdf%3E' 14 13 PASS canonicalize('http://www.example.com/?q="asdf"') is 'http://www.example.com/?q=%22asdf%22' -
trunk/LayoutTests/fast/url/script-tests/anchor.js
r57502 r57712 4 4 ["hello, world", "hello, world"], 5 5 ["\xc2\xa9", "\xc2\xa9"], 6 ["\ xF0\x90\x8C\x80ss", "\xF0\x90\x8C\x80ss"],6 ["\ud800\udf00ss", "\ud800\udf00ss"], 7 7 ["%41%a", "%41%a"], 8 ["\ xc2", "\xef\xbf\xbd"],9 ["a\ xef\xb7\x90", "a\xef\xbf\xbd"],8 ["\\ud800\\u597d", "\\uFFFD\\u597D"], 9 ["a\\uFDD0", "a\\uFDD0"], 10 10 ["asdf#qwer", "asdf#qwer"], 11 11 ["#asdf", "#asdf"], -
trunk/LayoutTests/fast/url/script-tests/query.js
r57501 r57712 2 2 3 3 cases = [ 4 // Regular ASCII case in some different encodings. 4 5 ["foo=bar", "foo=bar"], 6 // Allow question marks in the query without escaping 5 7 ["as?df", "as?df"], 6 ["as#df", "as%23df"], 7 ["\x02hello\x7f bye", "%02hello%7F%20bye"], 8 // Always escape '#' since it would mark the ref. 9 // Disabled because this test requires being able to set the query directly. 10 // ["as#df", "as%23df"], 11 // Escape some questionable 8-bit characters, but never unescape. 12 ["\\x02hello\x7f bye", "%02hello%7F%20bye"], 8 13 ["%40%41123", "%40%41123"], 9 ["q=\xe4\xbd\xa0\xe5\xa5\xbd", "q=%E4%BD%A0%E5%A5%BD"], 10 ["q=\xed\xed", "q=%EF%BF%BD%EF%BF%BD"], 14 // Chinese input/output 15 ["q=\u4F60\u597D", "q=%26%2320320%3B%26%2322909%3B"], 16 // Invalid UTF-8/16 input should be replaced with invalid characters. 17 ["q=\\ud800\\ud800", "q=%26%2355296%3B%26%2355296%3B"], 18 // Don't allow < or > because sometimes they are used for XSS if the 19 // URL is echoed in content. Firefox does this, IE doesn't. 11 20 ["q=<asdf>", "q=%3Casdf%3E"], 21 // Escape double quotemarks in the query. 12 22 ["q=\"asdf\"", "q=%22asdf%22"], 13 23 ]; -
trunk/LayoutTests/fast/url/script-tests/standard-url.js
r57585 r57712 4 4 ["http://www.google.com/foo?bar=baz#", "http://www.google.com/foo?bar=baz#"], 5 5 ["http://[www.google.com]/", "http://[www.google.com]/"], 6 ["ht\ttp:@www.google.com:80/;p?#", "ht%09tp://www.google.com:80/;p?#"], 6 // Disabled because whitespace gets treated different in this API. 7 // ["ht\ttp:@www.google.com:80/;p?#", "ht%09tp://www.google.com:80/;p?#"], 7 8 ["http:////////user:@google.com:99?foo", "http://user@google.com:99/?foo"], 8 9 // Disabled because this gets treated as a relative URL. … … 15 16 ["http:\\\\\\\\www.google.com\\\\foo", "http://www.google.com/foo"], 16 17 // Busted refs shouldn't make the whole thing fail. 17 ["http://www.google.com/asdf#\ xc2", "http://www.google.com/asdf#\xef\xbf\xbd"],18 ["http://www.google.com/asdf#\\ud800", "http://www.google.com/asdf#\\uFFFD"], 18 19 // Basic port tests. 19 20 ["http://foo:80/", "http://foo/"], -
trunk/LayoutTests/fast/url/script-tests/trivial.js
r57489 r57712 1 1 description("Test basic features of URL canonicalization"); 2 3 function canonicalize(url) {4 var a = document.createElement("a");5 a.href = url;6 return a.href;7 }8 2 9 3 cases = [ 10 4 ["http://example.com/", "http://example.com/"], 11 ["/", " file:///"],5 ["/", "http://example.org/"] 12 6 ]; 7 8 var originalBaseURL = canonicalize("."); 9 setBaseURL("http://example.org/foo/bar"); 13 10 14 11 for (var i = 0; i < cases.length; ++i) { … … 17 14 } 18 15 16 setBaseURL(originalBaseURL); 17 19 18 var successfullyParsed = true; -
trunk/LayoutTests/fast/url/standard-url-expected.txt
r57585 r57712 6 6 PASS canonicalize('http://www.google.com/foo?bar=baz#') is 'http://www.google.com/foo?bar=baz#' 7 7 PASS canonicalize('http://[www.google.com]/') is 'http://[www.google.com]/' 8 FAIL canonicalize('ht tp:@www.google.com:80/;p?#') should be ht%09tp://www.google.com:80/;p?#. Was http:@www.google.com:80/;p?#.9 8 FAIL canonicalize('http:////////user:@google.com:99?foo') should be http://user@google.com:99/?foo. Was http://////user:@google.com:99?foo. 10 9 FAIL canonicalize('http://192.0x00A80001') should be http://192.168.0.1/. Was http://192.0x00A80001/. … … 13 12 PASS canonicalize('http://%25DOMAIN:foobar@foodomain.com/') is 'http://%25DOMAIN:foobar@foodomain.com/' 14 13 PASS canonicalize('http:\\\\www.google.com\\foo') is 'http://www.google.com/foo' 15 FAIL canonicalize('http://www.google.com/asdf# Â') should be http://www.google.com/asdf#�. Was http://www.google.com/asdf#%C2.14 FAIL canonicalize('http://www.google.com/asdf#\ud800') should be http://www.google.com/asdf#�. Was http://www.google.com/asdf#%26%2355296%3B. 16 15 FAIL canonicalize('http://foo:80/') should be http://foo/. Was http://foo:80/. 17 16 PASS canonicalize('http://foo:81/') is 'http://foo:81/' -
trunk/LayoutTests/fast/url/trivial-expected.txt
r57489 r57712 5 5 6 6 PASS canonicalize('http://example.com/') is 'http://example.com/' 7 PASS canonicalize('/') is ' file:///'7 PASS canonicalize('/') is 'http://example.org/' 8 8 PASS successfullyParsed is true 9 9
Note: See TracChangeset
for help on using the changeset viewer.