| OLD | NEW |
| 1 description("Tests the properties of the exception thrown by dispatchEvent.") | 1 description("Tests the properties of the exception thrown by dispatchEvent.") |
| 2 | 2 |
| 3 var e; | 3 var e; |
| 4 try { | 4 try { |
| 5 document.dispatchEvent(null); | 5 document.dispatchEvent(null); |
| 6 // raises a InvalidStateError | 6 // raises a InvalidStateError |
| 7 } catch (err) { | 7 } catch (err) { |
| 8 e = err; | 8 e = err; |
| 9 } | 9 } |
| 10 | 10 |
| 11 shouldBeEqualToString("e.toString()", "InvalidStateError: Failed to execute 'dis
patchEvent' on 'EventTarget': The event provided is null."); | 11 shouldBeEqualToString("e.toString()", "InvalidStateError: Failed to execute 'dis
patchEvent' on 'EventTarget': The event provided is null."); |
| 12 shouldBeEqualToString("Object.prototype.toString.call(e)", "[object DOMException
]"); | 12 shouldBeEqualToString("Object.prototype.toString.call(e)", "[object DOMException
]"); |
| 13 shouldBeEqualToString("Object.prototype.toString.call(e.__proto__)", "[object DO
MExceptionPrototype]"); | 13 shouldBeEqualToString("Object.prototype.toString.call(e.__proto__)", "[object DO
MException]"); |
| 14 shouldBeEqualToString("e.constructor.toString()", "function DOMException() { [na
tive code] }"); | 14 shouldBeEqualToString("e.constructor.toString()", "function DOMException() { [na
tive code] }"); |
| 15 shouldBe("e.constructor", "window.DOMException"); | 15 shouldBe("e.constructor", "window.DOMException"); |
| 16 | |
| OLD | NEW |