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

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

Issue 2108153002: Do not wait for first video frame to start playing audio in a MediaStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix test Created 4 years, 6 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/renderer/media/webmediaplayer_ms.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/getusermedia.html
diff --git a/content/test/data/media/getusermedia.html b/content/test/data/media/getusermedia.html
index 0e98cc6c110f03b651a4372425d72e3da7ea6a16..474bdad72cf5776fff0edcc2bf84d56b96c975e3 100644
--- a/content/test/data/media/getusermedia.html
+++ b/content/test/data/media/getusermedia.html
@@ -460,8 +460,16 @@
var detectorFunction = function() {
var width = videoElement.videoWidth;
var height = videoElement.videoHeight;
- if (width == 0 || height == 0)
- failTest("VideoElement width and height set to 0.");
+ if (width == 0 || height == 0) {
+ if (++attempt > maxAttempts) {
+ clearInterval(detectorInterval);
+ failTest("VideoElement width or height set to 0.");
+ }
+ else {
+ // We have zero size now; give a chance to shape up.
+ return;
+ }
+ }
canvas.width = width;
canvas.height = height;
« no previous file with comments | « content/renderer/media/webmediaplayer_ms.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698