Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(221)

Side by Side Diff: LayoutTests/http/tests/media/audio-seekable-contains-zero-without-ranges.html

Issue 615193004: Add layout tests for seeks to zero on streaming sources. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Spaces! Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/media/resources/load-video.php » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <title>seekable() ranges contain zero when server doesn't support range requests .</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 <div id="log"></div>
7 <audio controls></audio>
8 <script>
9 async_test(function(t) {
10 var audio = document.querySelector('audio');
11
12 audio.onloadeddata = t.step_func(function() {
13 // Verify seekable range only contains zero.
14 assert_equals(audio.seekable.length, 1);
15 assert_equals(audio.seekable.start(0), 0);
16 assert_equals(audio.seekable.end(0), 0);
17
18 // Verify seeking to a nonzero position results in a seek to zero.
19 audio.currentTime = 1;
20 });
21
22 audio.onseeked = t.step_func(function() {
23 assert_equals(audio.currentTime, 0);
24 t.done();
25 });
26
27 var mediaFile = findMediaFile('audio', '../../../../media/content/silence');
28 var type = mimeTypeForExtension(mediaFile.split('.').pop());
29
30 audio.src = 'http://127.0.0.1:8000/media/resources/load-video.php' +
31 '?norange=true&name=' + mediaFile + '&type=' + type;
32 });
33 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/media/resources/load-video.php » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698