Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | <!DOCTYPE HTML> |
michael@0 | 2 | <html> |
michael@0 | 3 | <!-- |
michael@0 | 4 | https://bugzilla.mozilla.org/show_bug.cgi?id=572649 |
michael@0 | 5 | --> |
michael@0 | 6 | <head> |
michael@0 | 7 | <title>Test for Bug 572649</title> |
michael@0 | 8 | <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script> |
michael@0 | 9 | <script type="application/javascript" src="/tests/SimpleTest/EventUtils.js"></script> |
michael@0 | 10 | <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> |
michael@0 | 11 | </head> |
michael@0 | 12 | <body> |
michael@0 | 13 | <a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=572649">Mozilla Bug 572649</a> |
michael@0 | 14 | <p id="display"> |
michael@0 | 15 | <textarea id="area" rows="5"> |
michael@0 | 16 | Here |
michael@0 | 17 | is |
michael@0 | 18 | some |
michael@0 | 19 | very |
michael@0 | 20 | long |
michael@0 | 21 | text |
michael@0 | 22 | that |
michael@0 | 23 | we're |
michael@0 | 24 | using |
michael@0 | 25 | for |
michael@0 | 26 | testing |
michael@0 | 27 | purposes |
michael@0 | 28 | </textarea> |
michael@0 | 29 | </p> |
michael@0 | 30 | <div id="content" style="display: none"> |
michael@0 | 31 | |
michael@0 | 32 | </div> |
michael@0 | 33 | <pre id="test"> |
michael@0 | 34 | <script type="application/javascript"> |
michael@0 | 35 | |
michael@0 | 36 | /** Test for Bug 572649 **/ |
michael@0 | 37 | SimpleTest.waitForExplicitFinish(); |
michael@0 | 38 | addLoadEvent(function() { |
michael@0 | 39 | var area = document.getElementById("area"); |
michael@0 | 40 | |
michael@0 | 41 | is(area.scrollTop, 0, "The textarea should not be scrolled initially"); |
michael@0 | 42 | area.addEventListener("focus", function() { |
michael@0 | 43 | area.removeEventListener("focus", arguments.callee, false); |
michael@0 | 44 | setTimeout(function() { |
michael@0 | 45 | is(area.scrollTop, 0, "The textarea's insertion point should not be scrolled into view"); |
michael@0 | 46 | |
michael@0 | 47 | SimpleTest.finish(); |
michael@0 | 48 | }, 0); |
michael@0 | 49 | }, false); |
michael@0 | 50 | setTimeout(function() { |
michael@0 | 51 | var rect = area.getBoundingClientRect(); |
michael@0 | 52 | synthesizeMouse(area, rect.width - 5, 5, {}); |
michael@0 | 53 | }, 0); |
michael@0 | 54 | }); |
michael@0 | 55 | |
michael@0 | 56 | </script> |
michael@0 | 57 | </pre> |
michael@0 | 58 | </body> |
michael@0 | 59 | </html> |