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

Side by Side Diff: LayoutTests/fast/dom/Selection/script-tests/collapseToX-empty-selection.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("Test that collapseToStart() and collapseToEnd() throw INVALID_STATE _ERR if no selection is made."); 1 description("Test that collapseToStart() and collapseToEnd() throw INVALID_STATE _ERR if no selection is made.");
2 2
3 var sel = window.getSelection(); 3 var sel = window.getSelection();
4 var textNode = document.createTextNode("abcdef"); 4 var textNode = document.createTextNode("abcdef");
5 document.body.appendChild(textNode); 5 document.body.appendChild(textNode);
6 6
7 shouldThrow("sel.collapseToStart()", "'Error: InvalidStateError: DOM Exception 1 1'"); 7 shouldThrow("sel.collapseToStart()", "'InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable.'");
8 shouldThrow("sel.collapseToEnd()", "'Error: InvalidStateError: DOM Exception 11' "); 8 shouldThrow("sel.collapseToEnd()", "'InvalidStateError: An attempt was made to u se an object that is not, or is no longer, usable.'");
9 9
10 sel.selectAllChildren(textNode); 10 sel.selectAllChildren(textNode);
11 11
12 shouldBe("sel.collapseToStart()", "undefined"); 12 shouldBe("sel.collapseToStart()", "undefined");
13 shouldBe("sel.collapseToEnd()", "undefined"); 13 shouldBe("sel.collapseToEnd()", "undefined");
14 14
15 document.body.removeChild(textNode); 15 document.body.removeChild(textNode);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698