OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 |
| 5 </head> |
| 6 <body> |
| 7 <video controls></video> |
| 8 <p>This tests that a mouse events on the controls will not be seen by the vi
deo element.</p> |
| 9 <p>Also tests keyboard input.</p> |
| 10 <script src=media-file.js></script> |
| 11 <script src=video-test.js></script> |
| 12 <script src=media-controls.js></script> |
| 13 <script> |
| 14 waitForEventAndFail("click"); |
| 15 waitForEventAndFail("dblclick"); |
| 16 waitForEventAndFail("mousedown"); |
| 17 waitForEventAndFail("mouseup"); |
| 18 waitForEventAndFail("keydown"); |
| 19 |
| 20 waitForEventAndEnd("loadeddata", function() |
| 21 { |
| 22 if (window.eventSender) { |
| 23 // click the play button |
| 24 var coords = mediaControlsButtonCoordinates(video, "play-button"
); |
| 25 eventSender.mouseMoveTo(coords[0], coords[1]); |
| 26 |
| 27 eventSender.mouseDown(); |
| 28 eventSender.mouseUp(); |
| 29 eventSender.keyDown('A'); |
| 30 |
| 31 // Click the current time display, which should not respond to e
vents, but |
| 32 // should still capture them |
| 33 coords = mediaControlsButtonCoordinates(video, "current-time-dis
play"); |
| 34 eventSender.mouseMoveTo(coords[0], coords[1]); |
| 35 |
| 36 eventSender.mouseDown(); |
| 37 eventSender.mouseUp(); |
| 38 eventSender.keyDown('A'); |
| 39 |
| 40 // Click the timeline - this tests that multilevel shadow DOM el
ements work |
| 41 coords = mediaControlsButtonCoordinates(video, "timeline"); |
| 42 eventSender.mouseMoveTo(coords[0], coords[1]); |
| 43 |
| 44 eventSender.mouseDown(); |
| 45 eventSender.mouseUp(); |
| 46 eventSender.keyDown('A'); |
| 47 |
| 48 waitForEventAndFail("mousemove") |
| 49 |
| 50 // Check that the timeline also captures mousemove |
| 51 eventSender.mouseMoveTo(coords[0]+10, coords[1]+10) |
| 52 } |
| 53 }); |
| 54 video.src = findMediaFile("video", "content/test"); |
| 55 </script> |
| 56 </body> |
| 57 </html> |
OLD | NEW |