Index: LayoutTests/fast/xmlhttprequest/xmlhttprequest-open-exceptions.html |
diff --git a/LayoutTests/fast/xmlhttprequest/xmlhttprequest-open-exceptions.html b/LayoutTests/fast/xmlhttprequest/xmlhttprequest-open-exceptions.html |
index 6a869cdc2d1d994835a2a286e92c79b73d017485..2e767cb19fa1c89e15c1c9440a7eb5a4e96f6de9 100644 |
--- a/LayoutTests/fast/xmlhttprequest/xmlhttprequest-open-exceptions.html |
+++ b/LayoutTests/fast/xmlhttprequest/xmlhttprequest-open-exceptions.html |
@@ -26,6 +26,14 @@ |
xhrException = e; |
shouldBeEqualToString("xhrException.message", "Refused to connect to 'http://not.example.com/' because it violates the document's Content Security Policy."); |
} |
+ |
+ var badString = { toString: function() { throw "Exception in toString()"; } }; |
+ var xhr = new XMLHttpRequest(); |
+ shouldBe("xhr.readyState", "XMLHttpRequest.UNSENT"); |
+ shouldThrow("xhr.open('GET', 'resources/xmlhttprequest-get-data.xml', true, badString, 'password');", "'Exception in toString()'"); |
+ shouldBe("xhr.readyState", "XMLHttpRequest.UNSENT"); |
+ shouldThrow("xhr.open('GET', 'resources/xmlhttprequest-get-data.xml', true, 'username', badString);", "'Exception in toString()'"); |
+ shouldBe("xhr.readyState", "XMLHttpRequest.UNSENT"); |
</script> |
</body> |
</html> |