bug1123067-2.html (941B)
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 #2 for bug 1123067</title> 8 <script> 9 function test() { 10 for (var i = 0; i < 5; ++i) { 11 synthesizeKey("KEY_ArrowRight"); 12 } 13 synthesizeKey("KEY_ArrowLeft"); 14 document.documentElement.removeAttribute("class"); 15 } 16 function runTests() { 17 var e = document.querySelector('#test1'); 18 e.focus(); 19 } 20 </script> 21 <style> 22 div { -moz-user-select:none; } 23 div:focus { outline:1px solid black; } 24 </style> 25 </head> 26 <body> 27 28 <div id="test1" contenteditable="true" spellcheck="false" onfocus="setTimeout(test,0)">This text is NOT selectable.</div> 29 30 <script> 31 SimpleTest.waitForFocus(runTests); 32 </script> 33 </body> 34 </html>