Wed, 31 Dec 2014 06:09:35 +0100
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=970363
5 -->
6 <head>
7 <meta charset="utf-8">
8 <title>Test for Bug 970363</title>
9 <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
10 <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script>
11 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
12 </head>
13 <body>
14 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=970363">Mozilla Bug 970363</a>
15 <p id="display"></p>
16 <div id="content" style="display: none">
17 </div>
18 <div contenteditable="true" id='editablediv'>
19 <div id='t'>S<span contenteditable="false">readonly</span>E</div>
20 </div>
21 <pre id="test">
23 <script type="application/javascript">
25 /** Test for Bug 970363 **/
27 SimpleTest.waitForExplicitFinish();
29 SimpleTest.waitForFocus(function() {
30 var t = document.getElementById("t");
31 var editablediv = document.getElementById("editablediv");
32 var sel = window.getSelection();
33 editablediv.focus();
34 sel.collapse(t, 0);
36 // Move past the 'S' char.
37 synthesizeKey("VK_RIGHT", {});
38 // Move across the span.
39 synthesizeKey("VK_RIGHT", {});
40 // Insert an 'I' to show when IP currently is.
41 synthesizeKey("I", {});
43 is(t.textContent, "SreadonlyIE", "the 'I' char should be inserted between 'readonly' and 'E'");
44 SimpleTest.finish();
45 });
47 </script>
49 </pre>
50 </body>
51 </html>