|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=868999 |
|
5 --> |
|
6 <head> |
|
7 <meta charset="utf-8"> |
|
8 <title>Test for Bug 868999</title> |
|
9 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
|
11 </head> |
|
12 <body> |
|
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=868999">Mozilla Bug 869006</a> |
|
14 <p id="display"></p> |
|
15 <div id="content" style="display: none"> |
|
16 |
|
17 </div> |
|
18 <pre id="test"> |
|
19 <script type="application/javascript"> |
|
20 |
|
21 /** Test for Bug 868999 **/ |
|
22 |
|
23 var r = new Range(); |
|
24 ok(r, "Range has been created"); |
|
25 |
|
26 var doc = document.implementation.createDocument("", "", null); |
|
27 var h1 = doc.createElement('h1'); |
|
28 doc.appendChild(h1); |
|
29 |
|
30 var t = doc.createTextNode('Hello world'); |
|
31 h1.appendChild(t); |
|
32 |
|
33 r.selectNodeContents(doc); |
|
34 is(r.toString(), "Hello world", "new Range() works!"); |
|
35 |
|
36 </script> |
|
37 </pre> |
|
38 </body> |
|
39 </html> |