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

Side by Side Diff: LayoutTests/fast/mediarecorder/MediaRecorder-basic-video.html

Issue 1255873002: MediaRecorder Blink part (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: esprehn@ last comments Created 5 years, 3 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/fast/mediarecorder/MediaRecorder-basic-video-expected.txt » ('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 <script src=../../resources/testharness.js></script>
3 <script src=../../resources/testharnessreport.js></script>
4 <script>
5
6 var test = async_test('checks the video-only MediaRecorder API.');
7
8 recorderOnDataAvailable = test.step_func(function(event) {
9 assert_greater_than(event.data.size, 0, 'Recorded data size should be > 0');
10 assert_eq(recorder.state, "recording");
11
12 // TODO(mcasas): Let the test record for a while.
13 // TODO(mcasas): Consider storing the recorded data and playing it back.
14
15 test.done();
16 });
17
18 recorderOnStop = test.step_func(function() {
19 assert_unreached('Recording stopped.');
20 });
21
22 gotStream = test.step_func(function(s) {
23 stream = s;
24 assert_equals(stream.getAudioTracks().length, 0);
25 assert_equals(stream.getVideoTracks().length, 1);
26
27 try {
28 recorder = new MediaRecorder(stream);
29 } catch (e) {
30 assert_unreached('Exception while creating MediaRecorder: ' + e);
31 }
32
33 assert_eq(recorder.state, "inactive");
34 recorder.ondataavailable = recorderOnDataAvailable;
35 recorder.onstop = recorderOnStop;
36 recorder.start();
37 });
38
39 onError = test.step_func(function() {
40 assert_unreached('Error creating MediaRecorder.');
41 });
42
43 try {
44 navigator.webkitGetUserMedia({video:true}, gotStream, onError);
45 } catch(e) {
46 assert_unreached('Exception launching getUserMedia(): ' + e);
47 }
48
49 </script>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/mediarecorder/MediaRecorder-basic-video-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698