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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/mediacapturefromelement/HTMLMediaElementCapture-captureStreamUntilEnded.html

Issue 2110573002: MediaCaptureFromElement: add captureStreamUntilEnded() and LayoutTest (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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
OLDNEW
(Empty)
1 <!DOCTYPE html>
2 <script src=../../resources/testharness.js></script>
3 <script src=../../resources/testharnessreport.js></script>
4 <script>
5
6 // Run captureStreamUntilEnded() on different videos, and assert onEnded is fire d.
7
8 var makeAsyncTest = function(filename) {
9 async_test(function(test) {
10 var stream;
11
12 var video = document.createElement('video');
13 video.src = "../../http/tests/media/resources/media-source/webm/" + filename ;
14 video.onerror = this.unreached_func("<video> error");
15 video.onloadedmetadata = this.step_func(function() {
16 stream = video.captureStreamUntilEnded();
17 stream.oninactive = test.step_func_done(function() {});
18
19 video.play();
20 });
21 video.onplay = this.step_func(function() {
22 // Skip forward till almost the end of the video to speed up the test.
23 video.currentTime = video.duration - 0.1;
24 });
25
26 video.load();
27 }), "<video>.captureStreamUntilEnded() and assert data flows.";
28 };
29
30 generate_tests(makeAsyncTest,
31 [[ "video-only", "test-v-128k-320x240-24fps-8kfr.webm"],
32 [ "audio-only", "test-a-128k-44100Hz-1ch.webm"]]);
33
34 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698