test_bug1550869_video.html (1122B)
1 <!DOCTYPE HTML> 2 <html> 3 <title>Bug 1516963: Test AccessibleCaret doesn't show when clicking on an empty video container.</title> 4 <script src="/tests/SimpleTest/EventUtils.js"></script> 5 <script src="/tests/SimpleTest/SimpleTest.js"></script> 6 <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/> 7 <style> 8 #container { 9 border: 1px solid blue; 10 width: 100px; 11 height: 100px; 12 background-color: yellow; 13 } 14 </style> 15 <script> 16 SimpleTest.waitForExplicitFinish(); 17 18 document.addEventListener("selectionchange", () => { 19 ok(window.getSelection().isCollapsed, "The selection should be collapsed!"); 20 }); 21 22 function click() { 23 ok(window.getSelection().isCollapsed, "The selection should start collapsed!"); 24 let container = document.getElementById("container"); 25 synthesizeMouseAtCenter(container, {}); 26 setTimeout(() => { 27 ok(window.getSelection().isCollapsed, "The selection should remain collapsed!"); 28 SimpleTest.finish(); 29 }); 30 } 31 </script> 32 <body onload="SimpleTest.waitForFocus(click);"> 33 <video id="container"></video> 34 </body> 35 </html>