|
1 <!DOCTYPE HTML> |
|
2 <html> |
|
3 <!-- |
|
4 https://bugzilla.mozilla.org/show_bug.cgi?id=358660 |
|
5 --> |
|
6 <head> |
|
7 <title>Test for Bug 358660</title> |
|
8 <script type="text/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
|
9 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css" /> |
|
10 </head> |
|
11 <body> |
|
12 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=358660">Mozilla Bug 358660</a> |
|
13 <p id="display"></p> |
|
14 <div id="content" style="display: none"> |
|
15 <iframe id="testframe" |
|
16 src="data:text/html,<html><body>Some text</body></html>"></iframe> |
|
17 </div> |
|
18 <pre id="test"> |
|
19 <script class="testbody" type="text/javascript"> |
|
20 |
|
21 /** Test for Bug 358660 **/ |
|
22 SimpleTest.waitForExplicitFinish(); |
|
23 |
|
24 window.onload = function() { |
|
25 var doc = $("testframe").contentDocument; |
|
26 var range = doc.createRange(); |
|
27 range.selectNode(doc.documentElement); |
|
28 is(range.toString(), "Some text", "Check text"); |
|
29 |
|
30 SimpleTest.finish() |
|
31 } |
|
32 |
|
33 </script> |
|
34 </pre> |
|
35 </body> |
|
36 </html> |
|
37 |