Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(717)

Side by Side Diff: LayoutTests/fast/dom/DOMException/resources/dispatch-event-exception.js

Issue 16818023: DOMException toString is not correct (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: rebase Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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()", "Error: InvalidStateError: DOM Exception 1 1"); 11 shouldBeEqualToString("e.toString()", "InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable.");
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 MExceptionPrototype]");
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 16
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/DOMException/resources/XPathException.js ('k') | LayoutTests/fast/dom/DOMException/stack-trace.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698