bug1893673.html (1122B)
1 <!DOCTYPE HTML> 2 <html class="reftest-wait"> 3 <script src="/tests/SimpleTest/EventUtils.js"></script> 4 <script src="/tests/SimpleTest/SimpleTest.js"></script> 5 <script> 6 function run() { 7 const text = document.getElementById("text"); 8 // Triple click it 9 synthesizeMouse(text, 0, 0, {type: "mousedown", clickCount: 3}); 10 synthesizeMouse(text, 0, 0, {type: "mouseup", clickCount: 3}); 11 12 function waitForPaint() { 13 return new Promise(r => { 14 window.requestAnimationFrame(function () { 15 window.requestAnimationFrame(function () { 16 r(); 17 }); 18 }); 19 }); 20 } 21 22 waitForPaint().then(function () { 23 // Verify that this layout change doesn't cause the visual blue background 24 // of the text selection to disappear. 25 text.style["margin-top"] = "100px"; 26 waitForPaint().then(function () { 27 document.documentElement.className = ''; 28 }); 29 }); 30 } 31 SimpleTest.waitForFocus(run); 32 </script> 33 <body> 34 <div> 35 <div> 36 <span id="text">This is a loonnnnnnnnnnnnnnnnnnnnnnnnnnnng paragraph</span> 37 </div> 38 </div> 39 </body> 40 </html>