4 <title>drag timebar test
</title>
5 <script src=media-controls.js
></script>
6 <script src=media-file.js
></script>
7 <script src=video-test.js
></script>
14 if (window
.testRunner
)
15 testRunner
.dumpAsText();
22 testExpected("video.paused", false);
24 if (window
.eventSender
) {
27 seekCoords
= mediaControlsButtonCoordinates(video
, "timeline");
29 failTest(exception
.description
);
35 eventSender
.dragMode
= false;
36 eventSender
.mouseMoveTo(x
, y
);
37 eventSender
.mouseDown();
39 testExpected("video.paused", true);
41 // Drag mouse off of the slider thumb to make sure it continues to track
43 eventSender
.mouseMoveTo(x
, y
);
45 window
.setTimeout("move()", 100);
52 var delta
= (10 + moveCount
* 2) * (moveCount
% 2 ? 1 : -1);
54 if (window
.eventSender
) {
56 eventSender
.mouseMoveTo(x
, y
);
65 window
.setTimeout("move()", 100);
69 if (window
.eventSender
) {
70 testExpected("video.paused", true);
71 eventSender
.mouseUp();
74 testExpected("video.paused", false);
82 waitForEventOnce('playing', test
);
83 waitForEvent('seeked', seeked
);
84 video
.src
= findMediaFile("video", "content/test");
90 <body onload=
"start()">
91 <p>Test that dragging the timebar thumb causes seeks.
</p>
92 <video controls
></video>