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

Unified Diff: content/test/data/media/webrtc_test_utilities.js

Issue 1729683002: Remove old-style constraints from Chrome internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Complete the interface change Created 4 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
Index: content/test/data/media/webrtc_test_utilities.js
diff --git a/content/test/data/media/webrtc_test_utilities.js b/content/test/data/media/webrtc_test_utilities.js
index daf6c5771c87e1d0170379ea5a7e58bd37a576e4..32c0f52f211285567e93d520a1c6cb0191b8d71e 100644
--- a/content/test/data/media/webrtc_test_utilities.js
+++ b/content/test/data/media/webrtc_test_utilities.js
@@ -80,9 +80,13 @@ function detectVideo(videoElementName, predicate, callback) {
// Check that there is an old and a new picture with the same size to
// compare and use the function |predicate| to detect the video state in
// that case.
+ // There's a failure(?) mode here where the video generated claims to
+ // have size 2x2. Don't consider that a valid video.
if (oldPixels.length == pixels.length &&
predicate(pixels, oldPixels)) {
console.log('Done looking at video in element ' + videoElementName);
+ console.log('DEBUG: video.width = ' + videoElement.videoWidth);
+ console.log('DEBUG: video.height = ' + videoElement.videoHeight);
clearInterval(waitVideo);
callback(videoElement.videoWidth, videoElement.videoHeight);
}
@@ -91,6 +95,10 @@ function detectVideo(videoElementName, predicate, callback) {
if (elapsedTime > 3000) {
startTimeMs = new Date().getTime();
console.log('Still waiting for video to satisfy ' + predicate.toString());
+ console.log('DEBUG: video.width = ' + videoElement.videoWidth);
+ console.log('DEBUG: video.height = ' + videoElement.videoHeight);
+ // clearInterval(waitVideo);
+ // callback(0, 0);
}
}, 200);
}

Powered by Google App Engine
This is Rietveld 408576698