| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>drag timebar test</title> | 4 <title>drag timebar test</title> |
| 5 <script src=media-controls.js></script> | 5 <script src=media-controls.js></script> |
| 6 <script src=media-file.js></script> | 6 <script src=media-file.js></script> |
| 7 <script src=video-test.js></script> | 7 <script src=video-test.js></script> |
| 8 <script> | 8 <script> |
| 9 var x; | 9 var x; |
| 10 var y; | 10 var y; |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 failTest(exception.description); | 29 failTest(exception.description); |
| 30 return; | 30 return; |
| 31 } | 31 } |
| 32 x = seekCoords[0]; | 32 x = seekCoords[0]; |
| 33 y = seekCoords[1]; | 33 y = seekCoords[1]; |
| 34 | 34 |
| 35 eventSender.dragMode = false; | 35 eventSender.dragMode = false; |
| 36 eventSender.mouseMoveTo(x, y); | 36 eventSender.mouseMoveTo(x, y); |
| 37 eventSender.mouseDown(); | 37 eventSender.mouseDown(); |
| 38 | 38 |
| 39 testExpected("video.paused", true); | 39 testExpected("video.paused", false); |
| 40 | 40 |
| 41 // Drag mouse off of the slider thumb to make sure it contin
ues to track | 41 // Drag mouse off of the slider thumb to make sure it contin
ues to track |
| 42 y += 100; | 42 y += 100; |
| 43 eventSender.mouseMoveTo(x, y); | 43 eventSender.mouseMoveTo(x, y); |
| 44 } | 44 } |
| 45 window.setTimeout("move()", 100); | 45 window.setTimeout("move()", 100); |
| 46 } | 46 } |
| 47 | 47 |
| 48 function move() | 48 function move() |
| 49 { | 49 { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 60 function seeked() | 60 function seeked() |
| 61 { | 61 { |
| 62 | 62 |
| 63 ++seekCount; | 63 ++seekCount; |
| 64 if (seekCount < 6) { | 64 if (seekCount < 6) { |
| 65 window.setTimeout("move()", 100); | 65 window.setTimeout("move()", 100); |
| 66 return; | 66 return; |
| 67 } | 67 } |
| 68 | 68 |
| 69 if (window.eventSender) { | 69 if (window.eventSender) { |
| 70 testExpected("video.paused", true); | 70 testExpected("video.paused", false); |
| 71 eventSender.mouseUp(); | 71 eventSender.mouseUp(); |
| 72 } | 72 } |
| 73 | 73 |
| 74 testExpected("video.paused", false); | 74 testExpected("video.paused", false); |
| 75 | 75 |
| 76 endTest(); | 76 endTest(); |
| 77 } | 77 } |
| 78 | 78 |
| 79 function start() | 79 function start() |
| 80 { | 80 { |
| 81 findMediaElement(); | 81 findMediaElement(); |
| 82 waitForEventOnce('playing', test); | 82 waitForEventOnce('playing', test); |
| 83 waitForEvent('seeked', seeked); | 83 waitForEvent('seeked', seeked); |
| 84 video.src = findMediaFile("video", "content/test"); | 84 video.src = findMediaFile("video", "content/test"); |
| 85 video.play(); | 85 video.play(); |
| 86 } | 86 } |
| 87 </script> | 87 </script> |
| 88 </head> | 88 </head> |
| 89 | 89 |
| 90 <body onload="start()"> | 90 <body onload="start()"> |
| 91 <p>Test that dragging the timebar thumb causes seeks.</p> | 91 <p>Test that dragging the timebar thumb causes seeks.</p> |
| 92 <video controls></video> | 92 <video controls></video> |
| 93 </body> | 93 </body> |
| 94 </html> | 94 </html> |
| OLD | NEW |