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

Unified Diff: third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-audio-video.html

Issue 1652373004: MediaRecorder: add and wire read {video,audio}BitsPerSecond props (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: philipj@ nits Created 4 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-audio-video.html
diff --git a/third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-audio-video.html b/third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-audio-video.html
index d65727c9da679f684e5b7d08f0a52e102ab152a0..55a7e14f915ebb51f9811777dfc1c18037ea03bf 100644
--- a/third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-audio-video.html
+++ b/third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-audio-video.html
@@ -25,7 +25,7 @@ var checkStreamTracks = function(stream, has_video, has_audio) {
var makeAsyncTest = function(value, expected) {
var recorder;
- async_test(function() {
+ async_test(function(test) {
const recorderOnDataAvailable = this.step_func(function(event) {
if (event) {
assert_greater_than(event.data.size, 0,
@@ -44,22 +44,13 @@ var makeAsyncTest = function(value, expected) {
const recorderOnStopExpected = this.step_func_done();
- const recorderOnStopUnexpected = this.step_func(function() {
- assert_unreached('Recording stopped.');
- });
-
- const recorderOnError = this.step_func(function() {
- assert_unreached('Recording error.');
- });
+ const recorderOnStopUnexpected = test.unreached_func('Recording stopped.');
+ const recorderOnError = test.unreached_func('Recording error.');
const gotStream = this.step_func_done(function(stream) {
checkStreamTracks(stream, value['video'], value['audio']);
- try {
- recorder = new MediaRecorder(stream);
- } catch (e) {
- assert_unreached('Exception while creating MediaRecorder: ' + e);
- }
+ recorder = new MediaRecorder(stream);
assert_equals(recorder.state, "inactive");
recorder.ondataavailable = recorderOnDataAvailable;
@@ -70,15 +61,8 @@ var makeAsyncTest = function(value, expected) {
assert_equals(recorder.state, "recording");
});
- const onError = this.step_func(function() {
- assert_unreached('Error creating MediaRecorder.');
- });
-
- try {
- navigator.webkitGetUserMedia(value, gotStream, onError);
- } catch(e) {
- assert_unreached('Exception launching getUserMedia(): ' + e);
- }
+ const onError = test.unreached_func('Error creating MediaStream.');
+ navigator.webkitGetUserMedia(value, gotStream, onError);
});
};

Powered by Google App Engine
This is Rietveld 408576698