docshell/test/navigation/test_bug430624.html

branch
TOR_BUG_9701
changeset 15
b8a032363ba2
equal deleted inserted replaced
-1:000000000000 0:6ac542d1d21f
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=430624
5 -->
6 <head>
7 <title>Test for Bug 430624</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 <script type="text/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
11 </head>
12 <body>
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=430624">Mozilla Bug 430624</a>
14 <p id="display"></p>
15
16
17
18 <div id="content" style="display: none">
19
20 </div>
21 <pre id="test">
22 <script class="testbody" type="text/javascript">
23
24 /** Test for Bug 430624 **/
25
26 function onLoad() {
27 window.frames[0].frameElement.onload = onReload;
28 window.frames[0].location = window.frames[0].location;
29 }
30
31 function onReload() {
32 var iframe = window.frames[0].frameElement;
33 SimpleTest.waitForFocus(doTest, iframe.contentWindow);
34 iframe.contentDocument.body.focus();
35 }
36
37 function doTest() {
38 var bodyElement = window.frames[0].frameElement.contentDocument.body;
39 bodyElement.focus();
40 sendString('Still ', window.frames[0].frameElement.contentWindow);
41
42 is(bodyElement.innerHTML, "Still contentEditable", "Check we're contentEditable after reload");
43
44 SimpleTest.finish();
45 }
46
47 SimpleTest.waitForExplicitFinish();
48
49 </script>
50 </pre>
51
52 <iframe onload="onLoad()" src="data:text/html;charset=utf-8,<body contenteditable>contentEditable</body>"></iframe>
53
54 </body>
55 </html>
56

mercurial