docshell/test/navigation/test_bug430624.html

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     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>
    18 <div id="content" style="display: none">
    20 </div>
    21 <pre id="test">
    22 <script class="testbody" type="text/javascript">
    24 /** Test for Bug 430624 **/
    26 function onLoad() {
    27   window.frames[0].frameElement.onload = onReload;
    28   window.frames[0].location = window.frames[0].location;
    29 }
    31 function onReload() {
    32   var iframe = window.frames[0].frameElement;
    33   SimpleTest.waitForFocus(doTest, iframe.contentWindow);
    34   iframe.contentDocument.body.focus();
    35 }
    37 function doTest() {
    38   var bodyElement = window.frames[0].frameElement.contentDocument.body;
    39   bodyElement.focus();
    40   sendString('Still ', window.frames[0].frameElement.contentWindow);
    42   is(bodyElement.innerHTML, "Still contentEditable", "Check we're contentEditable after reload");
    44   SimpleTest.finish();
    45 }
    47 SimpleTest.waitForExplicitFinish();
    49 </script>
    50 </pre>
    52 <iframe onload="onLoad()" src="data:text/html;charset=utf-8,<body contenteditable>contentEditable</body>"></iframe>
    54 </body>
    55 </html>

mercurial