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

Side by Side Diff: third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-bitrates.html

Issue 1610473002: MediaRecorder: wire the bitRate settings in Blink and content (2nd go) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: peter@s comments Created 4 years, 11 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 // This test verifies that MediaRecorder can be created or not with different
6 // bitrates for video, audio and for both [1].
7 // TODO(mcasas): test also the expected allocated values once [2] is closed.
8 // [1] https://rawgit.com/w3c/mediacapture-record/master/MediaRecorder.html#Medi aRecorderOptions
9 // [2] https://github.com/w3c/mediacapture-record/issues/43
10
11
12 function makeAsyncTest(options, message) {
13 return async_test(function(test) {
14 const constraints = {video: true, audio: false};
15
16 const gotStream = test.step_func(function(stream) {
17 assert_throws("NotSupportedError",
18 function() {
19 var recorder = new MediaRecorder(stream, options);
20 },
21 "recorder rejects too large bit rates");
22 test.done();
23 });
24
25 const onError = this.step_func(function() {
26 assert_unreached('Error creating MediaStream.');
27 });
28
29 try {
30 navigator.webkitGetUserMedia(constraints, gotStream, onError);
31 }
32 catch (e) {
33 assert_unreached('Exception launching getUserMedia(): ' + e);
34 }
35 }, message);
36 };
37
38 makeAsyncTest({audioBitsPerSecond:4294967294}, 'Audio bitrate too large');
39 makeAsyncTest({videoBitsPerSecond:4294967294}, 'Video bitrate too large');
40 makeAsyncTest({bitsPerSecond:4294967294}, 'Overall bitrate too large');
41
42 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698