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

Side by Side Diff: LayoutTests/fast/dom/Range/compareBoundaryPoints-1.html

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 <p>This tests to see that Range::compareBoundaryPoints throws a WrongDocumentErr or exception if the two ranges are in different documents, or if one is detached .</p> 1 <p>This tests to see that Range::compareBoundaryPoints throws a WrongDocumentErr or exception if the two ranges are in different documents, or if one is detached .</p>
2 <div id="div" contenteditable="true">dog<a href="http://www.google.com/">food</a ></div> 2 <div id="div" contenteditable="true">dog<a href="http://www.google.com/">food</a ></div>
3 <ul id="console"></ul> 3 <ul id="console"></ul>
4 4
5 <script> 5 <script>
6 function log(str) { 6 function log(str) {
7 var console = document.getElementById("console"); 7 var console = document.getElementById("console");
8 var li = document.createElement("li"); 8 var li = document.createElement("li");
9 li.appendChild(document.createTextNode(str)); 9 li.appendChild(document.createTextNode(str));
10 console.appendChild(li); 10 console.appendChild(li);
(...skipping 14 matching lines...) Expand all
25 r1.setEnd(link, 0); 25 r1.setEnd(link, 0);
26 26
27 var r2 = document.createRange(); 27 var r2 = document.createRange();
28 r2.setStart(text, 0); 28 r2.setStart(text, 0);
29 r2.setEnd(text, 0); 29 r2.setEnd(text, 0);
30 30
31 try { 31 try {
32 var compare = r1.compareBoundaryPoints(Range.START_TO_START, r2); 32 var compare = r1.compareBoundaryPoints(Range.START_TO_START, r2);
33 log("Error. compareBoundaryPoints should have thrown an exception."); 33 log("Error. compareBoundaryPoints should have thrown an exception.");
34 } catch (e) { 34 } catch (e) {
35 var expected = "Error: WrongDocumentError: DOM Exception 4"; 35 var expected = "WrongDocumentError: A Node was used in a different document than the one that created it (that doesn't support it).";
36 if (e != expected) 36 if (e != expected)
37 log("Error. Exception thrown should have been: " + expected); 37 log("Error. Exception thrown should have been: " + expected);
38 } 38 }
39 </script> 39 </script>
OLDNEW
« no previous file with comments | « LayoutTests/fast/dom/Range/31684-expected.txt ('k') | LayoutTests/fast/dom/Range/range-exceptions-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698