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=231389
5 -->
6 <head>
7 <title>Test for Bug 231389</title>
8 <script type="application/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=231389">Mozilla Bug 231389</a>
13 <p id="display">
14 <textarea id="area" rows="5">
15 Here
16 is
17 some
18 very
19 long
20 text
21 that
22 we're
23 using
24 for
25 testing
26 purposes
27 </textarea>
28 </p>
29 <div id="content" style="display: none">
31 </div>
32 <pre id="test">
33 <script type="application/javascript">
35 /** Test for Bug 231389 **/
36 SimpleTest.waitForExplicitFinish();
37 addLoadEvent(function() {
38 var area = document.getElementById("area");
39 var val = area.value;
40 var pos = val.indexOf("purposes");
42 is(area.scrollTop, 0, "The textarea should not be scrolled initially");
43 area.selectionStart = pos;
44 area.selectionEnd = pos;
45 setTimeout(function() {
46 isnot(area.scrollTop, 0, "The textarea's insertion point should be scrolled into view");
48 SimpleTest.finish();
49 }, 0);
50 });
52 </script>
53 </pre>
54 </body>
55 </html>