tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

test_bug572649.html (1559B)


      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 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=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">
     31  
     32 </div>
     33 <pre id="test">
     34 <script type="application/javascript">
     35 
     36 /** Test for Bug 572649 */
     37 SimpleTest.waitForExplicitFinish();
     38 
     39 // We intermittently trigger two "Wrong parent ComputedStyle" assertions
     40 // on B2G emulator builds (bug XXXXXXX).  The two frames that get incorrect
     41 // ComputedStyle parents are scroll bar parts in the <textarea>.
     42 SimpleTest.expectAssertions(0, 2);
     43 
     44 addLoadEvent(function() {
     45  var area = document.getElementById("area");
     46 
     47  is(area.scrollTop, 0, "The textarea should not be scrolled initially");
     48  area.addEventListener("focus", function() {
     49    setTimeout(function() {
     50      is(area.scrollTop, 0, "The textarea's insertion point should not be scrolled into view");
     51 
     52      SimpleTest.finish();
     53    }, 0);
     54  }, {once: true});
     55  setTimeout(function() {
     56    var rect = area.getBoundingClientRect();
     57    synthesizeMouse(area, rect.width - 5, 5, {});
     58  }, 0);
     59 });
     60 </script>
     61 </pre>
     62 </body>
     63 </html>