OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <title>Range.comparePoint</title> |
| 3 <link rel="author" title="Ms2ger" href="mailto:ms2ger@gmail.com"> |
| 4 <meta name=timeout content=long> |
| 5 <script src=../../../../resources/testharness.js></script> |
| 6 <script src=../../../../resources/testharnessreport.js></script> |
| 7 <div id=log></div> |
| 8 <script> |
| 9 test(function() { |
| 10 var r = document.createRange(); |
| 11 r.detach() |
| 12 assert_equals(r.comparePoint(document.body, 0), 1) |
| 13 }) |
| 14 test(function() { |
| 15 var r = document.createRange(); |
| 16 assert_throws(new TypeError(), function() { r.comparePoint(null, 0) }) |
| 17 }) |
| 18 test(function() { |
| 19 var doc = document.implementation.createHTMLDocument("tralala") |
| 20 var r = document.createRange(); |
| 21 assert_throws("WRONG_DOCUMENT_ERR", function() { r.comparePoint(doc.body, 0) }
) |
| 22 }) |
| 23 </script> |
OLD | NEW |