layout/forms/test/test_bug572649.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=572649
     5 -->
     6 <head>
     7   <title>Test for Bug 572649</title>
     8   <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
     9   <script type="application/javascript" 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=572649">Mozilla Bug 572649</a>
    14 <p id="display">
    15   <textarea id="area" rows="5">
    16   Here
    17   is
    18   some
    19   very
    20   long
    21   text
    22   that
    23   we're
    24   using
    25   for
    26   testing
    27   purposes
    28   </textarea>
    29 </p>
    30 <div id="content" style="display: none">
    32 </div>
    33 <pre id="test">
    34 <script type="application/javascript">
    36 /** Test for Bug 572649 **/
    37 SimpleTest.waitForExplicitFinish();
    38 addLoadEvent(function() {
    39   var area = document.getElementById("area");
    41   is(area.scrollTop, 0, "The textarea should not be scrolled initially");
    42   area.addEventListener("focus", function() {
    43     area.removeEventListener("focus", arguments.callee, false);
    44     setTimeout(function() {
    45       is(area.scrollTop, 0, "The textarea's insertion point should not be scrolled into view");
    47       SimpleTest.finish();
    48     }, 0);
    49   }, false);
    50   setTimeout(function() {
    51     var rect = area.getBoundingClientRect();
    52     synthesizeMouse(area, rect.width - 5, 5, {});
    53   }, 0);
    54 });
    56 </script>
    57 </pre>
    58 </body>
    59 </html>

mercurial