layout/forms/test/test_bug353539.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/forms/test/test_bug353539.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,52 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html>
     1.6 +<!--
     1.7 +https://bugzilla.mozilla.org/show_bug.cgi?id=353539
     1.8 +-->
     1.9 +<head>
    1.10 +  <title>Test for Bug 353539</title>
    1.11 +  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
    1.12 +  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
    1.13 +</head>
    1.14 +<body>
    1.15 +<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=353539">Mozilla Bug 353539</a>
    1.16 +<p id="display">
    1.17 +  <textarea id="area" rows="5">
    1.18 +  Here
    1.19 +  is
    1.20 +  some
    1.21 +  very
    1.22 +  long
    1.23 +  text
    1.24 +  that
    1.25 +  we're
    1.26 +  using
    1.27 +  for
    1.28 +  testing
    1.29 +  purposes
    1.30 +  </textarea>
    1.31 +</p>
    1.32 +<div id="content" style="display: none">
    1.33 +  
    1.34 +</div>
    1.35 +<pre id="test">
    1.36 +<script type="application/javascript">
    1.37 +
    1.38 +/** Test for Bug 353539 **/
    1.39 +SimpleTest.waitForExplicitFinish();
    1.40 +addLoadEvent(function() {
    1.41 +  var area = document.getElementById("area");
    1.42 +
    1.43 +  is(area.scrollTop, 0, "The textarea should not be scrolled initially");
    1.44 +  area.focus();
    1.45 +  setTimeout(function() {
    1.46 +    is(area.scrollTop, 0, "The textarea's insertion point should not be scrolled into view");
    1.47 +
    1.48 +    SimpleTest.finish();
    1.49 +  }, 0);
    1.50 +});
    1.51 +
    1.52 +</script>
    1.53 +</pre>
    1.54 +</body>
    1.55 +</html>

mercurial