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

Unified Diff: content/test/data/media/mediarecorder_test.html

Issue 2757793002: Add transparent video input test for WebRtcMediaRecorderBrowserTest (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « content/browser/webrtc/webrtc_media_recorder_browsertest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/test/data/media/mediarecorder_test.html
diff --git a/content/test/data/media/mediarecorder_test.html b/content/test/data/media/mediarecorder_test.html
index 1a9c645c4a0fb1deed17ec843431b2aa8fdc2a00..bdfb8d1d982caa18a290ea88fe38391d363fe449 100644
--- a/content/test/data/media/mediarecorder_test.html
+++ b/content/test/data/media/mediarecorder_test.html
@@ -538,12 +538,11 @@ function testTwoChannelAudio() {
});
}
-
-// Tests that MediaRecorder can handle a mid-stream resize of the video input
-function testResizeVideoInput(mimeType) {
+// Tests that MediaRecorder can handle video input with alpha channel.
+function testRecordWithTransparency(mimeType) {
const ON_DATA_AVAILABLE_THRESHOLD = 10;
const NUMBER_OF_EVENTS_TO_RECORD = 5;
-
+
var canvas = document.createElement('canvas');
canvas.width = canvas.height = 64;
var stream = canvas.captureStream();
@@ -553,7 +552,7 @@ function testResizeVideoInput(mimeType) {
var recordedEvents = 0;
function drawOnCanvas(canvas) {
- var ctx = canvas.getContext('2d');
+ var ctx = canvas.getContext('2d', {alpha: true});
ctx.fillStyle = 'green';
ctx.fillRect(0, 0, canvas.width, canvas.height);
requestAnimationFrame( function() { drawOnCanvas(canvas); });
@@ -574,16 +573,6 @@ function testResizeVideoInput(mimeType) {
return recordedEvents > NUMBER_OF_EVENTS_TO_RECORD;
});
})
- .then(function() {
- canvas.width = canvas.height = 48;
- recordedEvents = 0;
- })
- .then(function() {
- return waitFor('Make sure the recording has data',
- function() {
- return recordedEvents > NUMBER_OF_EVENTS_TO_RECORD;
- });
- })
.catch(function(err) {
return failTest(err.toString());
})
« no previous file with comments | « content/browser/webrtc/webrtc_media_recorder_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698