| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <title>Range.collapse() and .collapsed tests</title> | 2 <title>Range.collapse() and .collapsed tests</title> |
| 3 <link rel="author" title="Aryeh Gregor" href=ayg@aryeh.name> | 3 <link rel="author" title="Aryeh Gregor" href=ayg@aryeh.name> |
| 4 <meta name=timeout content=long> | 4 <meta name=timeout content=long> |
| 5 <div id=log></div> | 5 <div id=log></div> |
| 6 <script src=../../../../resources/testharness.js></script> | 6 <script src=/resources/testharness.js></script> |
| 7 <script src=../../../../resources/testharnessreport.js></script> | 7 <script src=/resources/testharnessreport.js></script> |
| 8 <script src=../common.js></script> | 8 <script src=../common.js></script> |
| 9 <script> | 9 <script> |
| 10 "use strict"; | 10 "use strict"; |
| 11 | 11 |
| 12 function testCollapse(rangeEndpoints, toStart) { | 12 function testCollapse(rangeEndpoints, toStart) { |
| 13 var range; | 13 var range; |
| 14 if (rangeEndpoints == "detached") { | 14 if (rangeEndpoints == "detached") { |
| 15 range = document.createRange(); | 15 range = document.createRange(); |
| 16 range.detach(); // should be a no-op and therefore the following should not
throw | 16 range.detach(); // should be a no-op and therefore the following should not
throw |
| 17 range.collapse(toStart); | 17 range.collapse(toStart); |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 tests.push([ | 66 tests.push([ |
| 67 "Range " + i + " " + testRanges[i] + ", toStart omitted", | 67 "Range " + i + " " + testRanges[i] + ", toStart omitted", |
| 68 eval(testRanges[i]), | 68 eval(testRanges[i]), |
| 69 undefined | 69 undefined |
| 70 ]); | 70 ]); |
| 71 } | 71 } |
| 72 generate_tests(testCollapse, tests); | 72 generate_tests(testCollapse, tests); |
| 73 | 73 |
| 74 testDiv.style.display = "none"; | 74 testDiv.style.display = "none"; |
| 75 </script> | 75 </script> |
| OLD | NEW |