editor/libeditor/text/tests/test_bug692520.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=692520
     5 -->
     6 <head>
     7   <title>Test for Bug 692520</title>
     8   <script type="application/javascript" src="/MochiKit/packed.js"></script>
     9   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    10   <script type="text/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=692520">Mozilla Bug 692520</a>
    15 <p id="display"></p>
    16 <div id="content">
    17 <textarea></textarea>
    18 </div>
    19 <pre id="test">
    20 <script type="application/javascript">
    22 /** Test for Bug 692520 **/
    23 function test(prop, value) {
    24   var t = document.querySelector("textarea");
    25   t.value = "testing";
    26   t.selectionStart = 1;
    27   t.selectionEnd = 3;
    28   t.selectionDirection = "backward";
    29   t.style.display = "";
    30   document.body.clientWidth;
    31   t.style.display = "none";
    32   is(t[prop], value, "Correct value for the " + prop + " property");
    33 }
    35 test("selectionStart", 1);
    36 test("selectionEnd", 3);
    37 test("selectionDirection", "backward");
    39 </script>
    40 </pre>
    41 </body>
    42 </html>

mercurial