Index: third_party/WebKit/LayoutTests/fast/dom/DOMException/resources/dispatch-event-exception.js |
diff --git a/third_party/WebKit/LayoutTests/fast/dom/DOMException/resources/dispatch-event-exception.js b/third_party/WebKit/LayoutTests/fast/dom/DOMException/resources/dispatch-event-exception.js |
index f92cfe5dbfe8304ef83742ffc51de120519a73f7..9e6f10e02705ba01370c82b9db6746f51b6e4e08 100644 |
--- a/third_party/WebKit/LayoutTests/fast/dom/DOMException/resources/dispatch-event-exception.js |
+++ b/third_party/WebKit/LayoutTests/fast/dom/DOMException/resources/dispatch-event-exception.js |
@@ -1,16 +1,4 @@ |
-description("Tests the properties of the exception thrown by dispatchEvent.") |
- |
-var e; |
-try { |
- document.dispatchEvent(null); |
- // raises a InvalidStateError |
-} catch (err) { |
- e = err; |
-} |
- |
-shouldBeEqualToString("e.toString()", "InvalidStateError: Failed to execute 'dispatchEvent' on 'EventTarget': The event provided is null."); |
-shouldBeEqualToString("Object.prototype.toString.call(e)", "[object DOMException]"); |
-shouldBeEqualToString("Object.prototype.toString.call(e.__proto__)", "[object DOMExceptionPrototype]"); |
-shouldBeEqualToString("e.constructor.toString()", "function DOMException() { [native code] }"); |
-shouldBe("e.constructor", "window.DOMException"); |
+description("Tests that dispatchEvent's argument is required to be an Event.") |
+shouldThrow("document.dispatchEvent(null)"); |
+shouldThrow("document.dispatchEvent(document)"); |