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

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

Issue 1448203002: Add layout tests for the audio component of MediaStream Recording. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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-basic-video.html b/third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-audio-video.html
similarity index 79%
copy from third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-basic-video.html
copy to third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-audio-video.html
index 7021d36828689cb0fb5e7e1ebb821ae12b39a649..83eb86572d217fc38465ffddc98ecaf43cf289e7 100644
--- a/third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-basic-video.html
+++ b/third_party/WebKit/LayoutTests/fast/mediarecorder/MediaRecorder-audio-video.html
@@ -3,7 +3,7 @@
<script src=../../resources/testharnessreport.js></script>
<script>
-var test = async_test('checks the video-only MediaRecorder API.');
+var test = async_test('checks the combined audio and video MediaRecorder API.');
var recorder;
recorderOnDataAvailable = test.step_func(function(event) {
@@ -14,8 +14,8 @@ recorderOnDataAvailable = test.step_func(function(event) {
assert_equals(recorder.state, "inactive");
}
- // TODO(mcasas): Let the test record for a while.
- // TODO(mcasas): Consider storing the recorded data and playing it back.
+ // TODO(ajose): Let the test record for a while.
+ // TODO(ajose): Consider storing the recorded data and playing it back.
recorder.onstop = recorderOnStopExpected;
recorder.stop();
@@ -34,8 +34,9 @@ recorderOnError = test.step_func(function() {
});
gotStream = test.step_func(function(stream) {
- assert_equals(stream.getAudioTracks().length, 0);
+ assert_equals(stream.getAudioTracks().length, 1);
assert_equals(stream.getVideoTracks().length, 1);
+ assert_equals(stream.getAudioTracks()[0].readyState, 'live');
assert_equals(stream.getVideoTracks()[0].readyState, 'live');
try {
@@ -59,7 +60,7 @@ onError = test.step_func(function() {
});
try {
- navigator.webkitGetUserMedia({video:true}, gotStream, onError);
+ navigator.webkitGetUserMedia({video:true, audio:true}, gotStream, onError);
} catch(e) {
assert_unreached('Exception launching getUserMedia(): ' + e);
}

Powered by Google App Engine
This is Rietveld 408576698