2 <title>Verifies timeline control seeks outside of seekable() fizzle.
</title>
3 <script src=
"../resources/testharness.js"></script>
4 <script src=
"../resources/testharnessreport.js"></script>
5 <script src=
"../../media-resources/media-file.js"></script>
6 <script src=
"../../media-resources/media-controls.js"></script>
8 <audio controls
></audio>
10 async_test(function(t
) {
11 var audio
= document
.querySelector('audio');
13 audio
.onloadeddata
= t
.step_func(function() {
14 // Verify seekable range only contains zero.
15 assert_equals(audio
.seekable
.length
, 1);
16 assert_equals(audio
.seekable
.start(0), 0);
17 assert_equals(audio
.seekable
.end(0), 0);
19 // Click the middle of the timeline.
20 var coords
= mediaControlsButtonCoordinates(audio
, "timeline");
21 eventSender
.mouseMoveTo(coords
[0], coords
[1]);
22 eventSender
.mouseDown();
23 eventSender
.mouseUp();
25 assert_false(audio
.seeking
);
26 assert_equals(audio
.currentTime
, 0);
30 var mediaFile
= findMediaFile('audio', '../../../../media/content/silence');
31 var type
= mimeTypeForExtension(mediaFile
.split('.').pop());
33 audio
.src
= 'http://127.0.0.1:8000/media/resources/load-video.php' +
34 '?norange=true&name=' + mediaFile
+ '&type=' + type
;