Bug 1772588 [wpt PR 34302] - [wpt] Add test for block-in-inline offsetParent., a...
[gecko.git] / editor / libeditor / tests / test_bug692520.html
blob68c7d5d11c33f89987d7270ae5b775b6713b3cd2
1 <!DOCTYPE HTML>
2 <html>
3 <!--
4 https://bugzilla.mozilla.org/show_bug.cgi?id=692520
5 -->
6 <head>
7 <title>Test for Bug 692520</title>
8 <script src="/tests/SimpleTest/SimpleTest.js"></script>
9 <script src="/tests/SimpleTest/EventUtils.js"></script>
10 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
11 </head>
12 <body>
13 <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=692520">Mozilla Bug 692520</a>
14 <p id="display"></p>
15 <div id="content">
16 <textarea></textarea>
17 </div>
18 <pre id="test">
19 <script type="application/javascript">
21 /** Test for Bug 692520 **/
22 function test(prop, value) {
23 var t = document.querySelector("textarea");
24 t.value = "testing";
25 t.selectionStart = 1;
26 t.selectionEnd = 3;
27 t.selectionDirection = "backward";
28 t.style.display = "";
29 document.body.clientWidth;
30 t.style.display = "none";
31 is(t[prop], value, "Correct value for the " + prop + " property");
34 test("selectionStart", 1);
35 test("selectionEnd", 3);
36 test("selectionDirection", "backward");
38 </script>
39 </pre>
40 </body>
41 </html>