2011-04-25 Maciej Stachowiak <mjs@apple.com>
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Apr 2011 09:59:58 +0000 (09:59 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 25 Apr 2011 09:59:58 +0000 (09:59 +0000)
        Reviewed by Cameron Zwarich.

        Fix tests after URL parsing fix
        https://bugs.webkit.org/show_bug.cgi?id=59317

        * fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-host.js: Update
        expected behavior.
        * fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-protocol.js: Update expected
        behavior.
        * fast/dom/HTMLAnchorElement/set-href-attribute-host-expected.txt: Update expectations.
        * fast/dom/HTMLAnchorElement/set-href-attribute-protocol-expected.txt: Update expectations.
        * fast/loader/url-parse-1-expected.txt: Update expectations.
        * http/tests/loading/cross-origin-XHR-willLoadRequest.html: Replace single slash
        in an http: URL with a double slash - the single slash seemed to be erroneous.

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

LayoutTests/ChangeLog
LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-host.js
LayoutTests/fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-protocol.js
LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-host-expected.txt
LayoutTests/fast/dom/HTMLAnchorElement/set-href-attribute-protocol-expected.txt
LayoutTests/fast/loader/url-parse-1-expected.txt
LayoutTests/http/tests/loading/cross-origin-XHR-willLoadRequest.html

index 0aff201..f1a4927 100644 (file)
@@ -1,3 +1,20 @@
+2011-04-25  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Cameron Zwarich.
+
+        Fix tests after URL parsing fix
+        https://bugs.webkit.org/show_bug.cgi?id=59317
+
+        * fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-host.js: Update
+        expected behavior.
+        * fast/dom/HTMLAnchorElement/script-tests/set-href-attribute-protocol.js: Update expected
+        behavior.
+        * fast/dom/HTMLAnchorElement/set-href-attribute-host-expected.txt: Update expectations.
+        * fast/dom/HTMLAnchorElement/set-href-attribute-protocol-expected.txt: Update expectations.
+        * fast/loader/url-parse-1-expected.txt: Update expectations.
+        * http/tests/loading/cross-origin-XHR-willLoadRequest.html: Replace single slash
+        in an http: URL with a double slash - the single slash seemed to be erroneous.
+
 2011-04-24  Dirk Pranke  <dpranke@chromium.org>
 
         Unreviewed, expectations change.
index 313cf0f..0eaf8a2 100644 (file)
@@ -77,11 +77,12 @@ shouldBe("a.href", "'https://www.otherdom/ain.com/path/'");
 debug("Exception: " + e.description);
 }
 
-// Firefox 3.5.2 add the missing '/' thus gets a different result than IE8 and Webkit.
+// WebKit fails to strip the \r in the authority, and therefore treats the URL as invalid
+// and gets a different result than Firefox or Chrome; we should probably strip it
 debug("Set host to a malformed URL");
 a.href = "https:/\rww.my@domain.com:8080/path/";
 a.host = "www.other!domain.com:15";
-shouldBe("a.href", "'https://www.other!domain.com:15/ww.my@domain.com:8080/path/'");
+shouldBe("a.href", "'https:/\\rww.my@domain.com:8080/path/'");
 
 // IE8 throws an "Object Error" exception.
 // Firefox 3.5.2 accepts this but throws an exception later
index b296dea..1afc38c 100644 (file)
@@ -60,11 +60,11 @@ shouldBe("a.href", "'https://www.mydomain.com/path/'");
 debug("Exception: " + e.description);
 }
 
-// Firefox 3.5.2 tries to build a hierarchical URL.
+// Firefox 4 adds three slashes, unlike Safari and Chrome
 debug("Set protocol to http on malformed URL");
 a.href = "foo:??bar";
 a.protocol = "http";
-shouldBe("a.href", "'http:??bar'");
+shouldBe("a.href", "'http:/??bar'");
 
 // IE8 keeps the protocol if it is 'c:'.
 debug("Set protocol to a URL which points to a local file");
index 6c457a4..04e6168 100644 (file)
@@ -26,7 +26,7 @@ PASS a.href is 'file://mydomain.com/path/'
 Set host containing slashes in it
 PASS a.href is 'https://www.otherdom/ain.com/path/'
 Set host to a malformed URL
-PASS a.href is 'https://www.other!domain.com:15/ww.my@domain.com:8080/path/'
+PASS a.href is 'https:/\rww.my@domain.com:8080/path/'
 Set host that starts with ':'
 PASS a.href is 'https://domain.com:8080/path/'
 Set host to URL containing username and ..
index bd801ab..755ce07 100644 (file)
@@ -18,7 +18,7 @@ PASS a.href is 'https://www.mydomain.com/path/'
 Set protocol to empty string
 PASS a.href is 'https://www.mydomain.com/path/'
 Set protocol to http on malformed URL
-PASS a.href is 'http:??bar'
+PASS a.href is 'http:/??bar'
 Set protocol to a URL which points to a local file
 PASS a.href is 'f-oo:path'
 Set protocol to undefined
index 33ea5a7..81aab7d 100644 (file)
@@ -20,7 +20,7 @@ file:///test  file:///test            /test
 file://localhost       file:           
 file://localhost/      file:///                /
 file://localhost/test  file:///test            /test
-http:  http:           
+http:  http:/          /
 http:/ http:/          /
 http://        http:/          /
 http:///       http:/          /
index 05f3bea..ff2e8c0 100644 (file)
@@ -1,9 +1,9 @@
 <script>
     layoutTestController.dumpAsText();
-    layoutTestController.addURLToRedirect("http:/localhost:8000/loading/resources/bar.txt", "http://localhost:8000/loading/resources/foo.txt");
+    layoutTestController.addURLToRedirect("http://localhost:8000/loading/resources/bar.txt", "http://localhost:8000/loading/resources/foo.txt");
 
     var request = new XMLHttpRequest();
-    request.open("GET", "http:/localhost:8000/loading/resources/bar.txt");
+    request.open("GET", "http://localhost:8000/loading/resources/bar.txt");
     request.send();
 </script>
 <p>