Reviewed by Adele.
authoraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Oct 2006 16:36:16 +0000 (16:36 +0000)
committeraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 17 Oct 2006 16:36:16 +0000 (16:36 +0000)
        Fixes http://bugs.webkit.org/show_bug.cgi?id=11214
        http/tests/xmlhttprequest/exceptions.html needs new results

        Updating results after r16794.

        * http/tests/xmlhttprequest/exceptions-expected.txt:
        * http/tests/xmlhttprequest/exceptions.html: Add comments about why we
        don't follow the XHR spec.

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

LayoutTests/ChangeLog
LayoutTests/http/tests/xmlhttprequest/exceptions-expected.txt
LayoutTests/http/tests/xmlhttprequest/exceptions.html

index d3fed9f518d48b387082abca89e04257e9142aeb..96ea783cfc4985e7ef936f458bc04d40fb485c60 100644 (file)
@@ -1,3 +1,16 @@
+2006-10-17  Adam Roben  <aroben@apple.com>
+
+        Reviewed by Adele.
+
+        Fixes http://bugs.webkit.org/show_bug.cgi?id=11214
+        http/tests/xmlhttprequest/exceptions.html needs new results
+
+        Updating results after r16794.
+
+        * http/tests/xmlhttprequest/exceptions-expected.txt:
+        * http/tests/xmlhttprequest/exceptions.html: Add comments about why we
+        don't follow the XHR spec.
+
 2006-10-16  Justin Garcia  <justin.garcia@apple.com>
 
         Reviewed by harrison
index ad64cb232d8139da4f63edfa1cc1a1bae859ee59..2648593bc08f5e4bd7b3e3e42a4f0080eb41d52b 100644 (file)
@@ -1,7 +1,6 @@
 Test that XMLHttpRequest raises exceptions when it should.
 
 new XMLHttpRequest()
-PASS: req.setRequestHeader("Foo", "bar") threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
 PASS: req.send(null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
 PASS: req.open("GET", "http://www.apple.com/", true) threw exception Error: Permission denied.
 open()
@@ -11,6 +10,5 @@ PASS: req.status() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
 PASS: req.statusText() threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
 send()
 PASS: req.send(null) threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
-PASS: req.setRequestHeader("Foo", "bar") threw exception Error: INVALID_STATE_ERR: DOM Exception 11.
 PASS: req.getResponseHeader() threw exception SyntaxError: Not enough arguments.
 
index 686c0182ebb63ed5f06019218b74c92b737b6b6c..c1eb7948729cebec9e2d5ab774472c96690fc14c 100644 (file)
     }
     log("new XMLHttpRequest()");
 
-    shouldThrow('req.setRequestHeader("Foo", "bar")');
+    // According to the XHR spec, this should throw INVALID_STATE_ERR. However,
+    // widgets exist that depend on WebKit not throwing an exception here, and
+    // to make them keep working we have to go against spec and support this
+    // legacy behavior. See <rdar://problem/4758577> "REGRESSION: Business and
+    // People widgets fails to complete search query" for more details.
+    req.setRequestHeader("Foo", "bar");
+
     shouldThrow('req.send(null)');
 
     shouldThrow('req.open("GET", "http://www.apple.com/", true)');
 
     shouldThrow('req.send(null)');
 
-    shouldThrow('req.setRequestHeader("Foo", "bar")');
+    // According to the XHR spec, this should throw INVALID_STATE_ERR. However,
+    // widgets exist that depend on WebKit not throwing an exception here, and
+    // to make them keep working we have to go against spec and support this
+    // legacy behavior. See <rdar://problem/4758577> "REGRESSION: Business and
+    // People widgets fails to complete search query" for more details.
+    req.setRequestHeader("Foo", "bar");
 
     shouldThrow('req.getResponseHeader()');