2011-02-05 Eric Seidel <eric@webkit.org>
authoreric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Feb 2011 11:43:48 +0000 (11:43 +0000)
committereric@webkit.org <eric@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 5 Feb 2011 11:43:48 +0000 (11:43 +0000)
        Reviewed by Adam Barth.

        Safari should lowercase schemes in cannonicalized urls to match every other browser
        https://bugs.webkit.org/show_bug.cgi?id=53848

        Update our results now that we pass more tests.

        * fast/url/file-expected.txt:
        * fast/url/file-http-base-expected.txt:
        * fast/url/path-url-expected.txt:
        * fast/url/relative-expected.txt:
        * fast/url/scheme-expected.txt:
2011-02-05  Eric Seidel  <eric@webkit.org>

        Reviewed by Adam Barth.

        Safari should lowercase schemes in cannonicalized urls to match every other browser
        https://bugs.webkit.org/show_bug.cgi?id=53848

        We're clearly the odd man out here.  See results from every browser at:
        https://github.com/abarth/url-spec/blob/master/tests/gurl-results/by-browser.txt

        * platform/KURL.cpp:
        (WebCore::KURL::parse):
         - Just lowercase the scheme when copying.

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

LayoutTests/ChangeLog
LayoutTests/fast/url/file-expected.txt
LayoutTests/fast/url/file-http-base-expected.txt
LayoutTests/fast/url/path-url-expected.txt
LayoutTests/fast/url/relative-expected.txt
LayoutTests/fast/url/scheme-expected.txt
Source/WebCore/ChangeLog
Source/WebCore/platform/KURL.cpp

index 45cd38e584eabaf42694d7acab77a1a95a2f4b05..d4b8a4ffa57291512c3a2a3f941f29f6cd0f30b3 100644 (file)
@@ -1,3 +1,18 @@
+2011-02-05  Eric Seidel  <eric@webkit.org>
+
+        Reviewed by Adam Barth.
+
+        Safari should lowercase schemes in cannonicalized urls to match every other browser
+        https://bugs.webkit.org/show_bug.cgi?id=53848
+
+        Update our results now that we pass more tests.
+
+        * fast/url/file-expected.txt:
+        * fast/url/file-http-base-expected.txt:
+        * fast/url/path-url-expected.txt:
+        * fast/url/relative-expected.txt:
+        * fast/url/scheme-expected.txt:
+
 2011-02-04  Jer Noble  <jer.noble@apple.com>
 
         Adding test to Qt Skipped list.
index e85ff521eaf9e15ff48e183aed649370b3c4eb12..d2746733d6544f8957e8b0c43f8e631b6d452091 100644 (file)
@@ -17,7 +17,7 @@ PASS canonicalize('/\\server/file') is 'file://server/file'
 FAIL canonicalize('file:c:foo/bar.html') should be file:///C:/foo/bar.html. Was file:///tmp/mock/c:foo/bar.html.
 FAIL canonicalize('file:/\\/\\C:\\\\//foo\\bar.html') should be file:///C:////foo/bar.html. Was file:////C:////foo/bar.html.
 PASS canonicalize('file:///foo/bar.txt') is 'file:///foo/bar.txt'
-FAIL canonicalize('FILE:/\\/\\7:\\\\//foo\\bar.html') should be file://7:////foo/bar.html. Was FILE:////7:////foo/bar.html.
+FAIL canonicalize('FILE:/\\/\\7:\\\\//foo\\bar.html') should be file://7:////foo/bar.html. Was file:////7:////foo/bar.html.
 FAIL canonicalize('file:filer/home\\me') should be file://filer/home/me. Was file:///tmp/mock/filer/home/me.
 FAIL canonicalize('file:///C:/foo/../../../bar.html') should be file:///C:/bar.html. Was file:///bar.html.
 FAIL canonicalize('file:///C:/asdf#\xc2') should be file:///C:/asdf#�. Was file:///C:/asdf#%C2.
index aa860a1820b4a3aa83a087cf86d6c11c2259517e..afd313168bd1df2b6f9ffb4cc19c56d76264dab4 100644 (file)
@@ -4,7 +4,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 FAIL canonicalize('file:c:\\foo\\bar.html') should be file:///C:/foo/bar.html. Was file://c:/foo/bar.html.
-FAIL canonicalize('  File:c|////foo\\bar.html') should be file:///C:////foo/bar.html. Was File://c|////foo/bar.html.
+FAIL canonicalize('  File:c|////foo\\bar.html') should be file:///C:////foo/bar.html. Was file://c|////foo/bar.html.
 FAIL canonicalize('file:') should be file:///. Was file:.
 FAIL canonicalize('file:UNChost/path') should be file://unchost/path. Was file://UNChost/path.
 FAIL canonicalize('c:\\foo\\bar') should be file:///C:/foo/bar. Was c:/foo/bar.
@@ -17,7 +17,7 @@ FAIL canonicalize('/\\server/file') should be file://server/file. Was http://ser
 FAIL canonicalize('file:c:foo/bar.html') should be file:///C:/foo/bar.html. Was file://c:foo/bar.html.
 FAIL canonicalize('file:/\\/\\C:\\\\//foo\\bar.html') should be file:///C:////foo/bar.html. Was file:////C:////foo/bar.html.
 PASS canonicalize('file:///foo/bar.txt') is 'file:///foo/bar.txt'
-FAIL canonicalize('FILE:/\\/\\7:\\\\//foo\\bar.html') should be file://7:////foo/bar.html. Was FILE:////7:////foo/bar.html.
+FAIL canonicalize('FILE:/\\/\\7:\\\\//foo\\bar.html') should be file://7:////foo/bar.html. Was file:////7:////foo/bar.html.
 PASS canonicalize('file:filer/home\\me') is 'file://filer/home/me'
 FAIL canonicalize('file:///C:/foo/../../../bar.html') should be file:///C:/bar.html. Was file:///bar.html.
 FAIL canonicalize('file:///C:/asdf#\xc2') should be file:///C:/asdf#�. Was file:///C:/asdf#%C2.
index 73eaf548199a8f48232286597055a2d7bf6185b2..278b6239512d42ec4963450c8f46dceb73c7dc39 100644 (file)
@@ -4,7 +4,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 PASS canonicalize('javascript:') is 'javascript:'
-FAIL canonicalize('JavaScript:Foo') should be javascript:Foo. Was JavaScript:Foo.
+PASS canonicalize('JavaScript:Foo') is 'javascript:Foo'
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 684253f91f99c6b2744e1ba7dd36cd3c9d7ce0f6..8ee781c0aa326e464eb8c9a040581383984692a0 100644 (file)
@@ -14,7 +14,7 @@ PASS canonicalize('    ') is 'http://foo/bar'
 PASS canonicalize('http:path') is 'http://host/path'
 PASS canonicalize('http:path') is 'http://host/a/path'
 FAIL canonicalize('http:/path') should be http://host/path. Was http:/path.
-FAIL canonicalize('HTTP:/path') should be http://host/path. Was HTTP:/path.
+FAIL canonicalize('HTTP:/path') should be http://host/path. Was http:/path.
 FAIL canonicalize('https:host2') should be https://host2/. Was https:host2.
 PASS canonicalize('htto:/host2') is 'htto:/host2'
 PASS canonicalize('/b/c/d') is 'http://host/b/c/d'
index 8709b81810f4c72c2127dc1315e4c608b9cc42b9..fbc130d256c7fce51091bfe6c60c4e7b78bba536 100644 (file)
@@ -4,7 +4,7 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 
 
 PASS canonicalize('http://example.com/') is 'http://example.com/'
-FAIL canonicalize('HTTP://example.com/') should be http://example.com/. Was HTTP://example.com/.
+PASS canonicalize('HTTP://example.com/') is 'http://example.com/'
 PASS successfullyParsed is true
 
 TEST COMPLETE
index aa552452e9c25af0b6d1030b0391e16bf6ffb046..ccce480eea8626686dc9682477fa61a3c307fc06 100644 (file)
@@ -1,3 +1,17 @@
+2011-02-05  Eric Seidel  <eric@webkit.org>
+
+        Reviewed by Adam Barth.
+
+        Safari should lowercase schemes in cannonicalized urls to match every other browser
+        https://bugs.webkit.org/show_bug.cgi?id=53848
+
+        We're clearly the odd man out here.  See results from every browser at:
+        https://github.com/abarth/url-spec/blob/master/tests/gurl-results/by-browser.txt
+
+        * platform/KURL.cpp:
+        (WebCore::KURL::parse):
+         - Just lowercase the scheme when copying.
+
 2011-02-05  Antti Koivisto  <antti@apple.com>
 
         Reviewed by Dave Hyatt.
index 555b00f757651e10ef40dab0c4b9140bbd99414c..3ed666894a6a531d76a3c4f24c525bac294da844 100644 (file)
@@ -1246,7 +1246,7 @@ void KURL::parse(const char* url, const String* originalString)
     // copy in the scheme
     const char *schemeEndPtr = url + schemeEnd;
     while (strPtr < schemeEndPtr)
-        *p++ = *strPtr++;
+        *p++ = toASCIILower(*strPtr++);
     m_schemeEnd = p - buffer.data();
 
     bool hostIsLocalHost = portEnd - userStart == 9