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

Side by Side Diff: LayoutTests/fast/dom/Range/range-compareNode.html

Issue 974823002: Add [TypeChecking=Interface] to Range interface (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: add FIXME comments Created 5 years, 9 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <title>Test for Range.compareNode()</title> 3 <title>Test for Range.compareNode()</title>
4 <script> 4 <script>
5 function test() 5 function test()
6 { 6 {
7 // This method returns one of the following constants: 7 // This method returns one of the following constants:
8 // Node starts before the Range ( NODE_BEFORE = 0 ) 8 // Node starts before the Range ( NODE_BEFORE = 0 )
9 // Node starts after the Range ( NODE_AFTER = 1 ) 9 // Node starts after the Range ( NODE_AFTER = 1 )
10 // Node starts before and ends after the Range ( NODE_BEFORE_AND_AFTER = 2 ) 10 // Node starts before and ends after the Range ( NODE_BEFORE_AND_AFTER = 2 )
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
174 if (result == expectedResult) 174 if (result == expectedResult)
175 document.getElementById("test18").innerHTML = "test 18 passed: wrong doc uments"; 175 document.getElementById("test18").innerHTML = "test 18 passed: wrong doc uments";
176 176
177 177
178 // test 19 - node deleted 178 // test 19 - node deleted
179 range.selectNode(document.getElementById("a2")); 179 range.selectNode(document.getElementById("a2"));
180 var node = null; 180 var node = null;
181 try { 181 try {
182 result = range.compareNode(node); 182 result = range.compareNode(node);
183 } catch (e) { 183 } catch (e) {
184 if(e.code == DOMException.NOT_FOUND_ERR) { 184 if(e.name == "TypeError") {
185 document.getElementById("test19").innerHTML = "test 19 passed: delet ed node"; 185 document.getElementById("test19").innerHTML = "test 19 passed: delet ed node";
186 } else { 186 } else {
187 document.getElementById("test19").innerHTML = "<span style=\"color: red;\">test 19 failed error: " + e.message + "</span>"; 187 document.getElementById("test19").innerHTML = "<span style=\"color: red;\">test 19 failed error: " + e.message + "</span>";
188 } 188 }
189 } 189 }
190 190
191 if (window.testRunner) 191 if (window.testRunner)
192 testRunner.dumpAsText(); 192 testRunner.dumpAsText();
193 } 193 }
194 194
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 <div id=b3>b3</div> 231 <div id=b3>b3</div>
232 <div id=c3>c3</div> 232 <div id=c3>c3</div>
233 </div> 233 </div>
234 234
235 <iframe name="frame1" style="border: 1px solid black;"></iframe> 235 <iframe name="frame1" style="border: 1px solid black;"></iframe>
236 <iframe name="frame2" style="border: 1px solid black;"></iframe> 236 <iframe name="frame2" style="border: 1px solid black;"></iframe>
237 </div> 237 </div>
238 238
239 </body> 239 </body>
240 </html> 240 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698