bug1259949-1.html (1142B)
1 <!DOCTYPE HTML> 2 <html class="reftest-wait"> 3 <head> 4 <script src="/tests/SimpleTest/SimpleTest.js"></script> 5 <script src="/tests/SimpleTest/EventUtils.js"></script> 6 <meta charset="utf-8"> 7 <title>Testcase #1 for bug 1259949</title> 8 <script> 9 function test1() { 10 synthesizeKey("KEY_ArrowRight"); 11 synthesizeKey("KEY_ArrowRight"); 12 synthesizeKey("KEY_ArrowRight"); // caret is now between "c" and "d" 13 synthesizeKey("KEY_ArrowDown", {shiftKey: true}); // select "def\n" 14 synthesizeKey("KEY_ArrowRight"); // collapse to the end of the selection 15 // caret should now be at the start of the second line 16 document.body.offsetHeight; 17 setTimeout(function(){ document.documentElement.removeAttribute("class"); },0); 18 } 19 function runTests() { 20 document.querySelector('textarea').focus(); 21 document.body.offsetHeight; 22 } 23 </script> 24 </head> 25 <body> 26 27 <textarea onfocus="test1()" spellcheck="false" style="-moz-appearance:none">abcdef 28 </textarea> 29 30 <script> 31 SimpleTest.waitForFocus(runTests); 32 </script> 33 </body> 34 </html>