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

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

Issue 214663004: Add test for sending square resolution video on a PeerConnection. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 c56953fd2cbe64edf2e66019527d09dfc4183432..75ded1dee34e07d1343b10bbd9dd851c5c6f292e 100644
--- a/content/test/data/media/webrtc_test_utilities.js
+++ b/content/test/data/media/webrtc_test_utilities.js
@@ -72,12 +72,25 @@ function detectVideo(videoElementName, predicate, callback) {
predicate(pixels, oldPixels)) {
console.log('Done looking at video in element ' + videoElementName);
clearInterval(waitVideo);
- callback();
+ callback(videoElement.videoWidth, videoElement.videoHeight);
}
oldPixels = pixels;
}, 200);
}
+function waitForVideoAndExpectResolution(
+ videoElement,
phoglund_chromium 2014/03/28 08:33:30 Nit: indent 4 (or maybe if you can pull up the par
perkj_chrome 2014/03/28 09:14:23 Done.
+ expected_width,
+ expected_height) {
+ addExpectedEvent();
+ detectVideoPlaying(videoElement,
+ function (width, height) {
phoglund_chromium 2014/03/28 08:33:30 Nit: if you line break within the parameter list,
perkj_chrome 2014/03/28 09:14:23 Done.
+ assertEquals(expected_width, width);
+ assertEquals(expected_height, height);
+ eventOccured();
+ });
+}
+
function waitForVideo(videoElement) {
addExpectedEvent();
detectVideoPlaying(videoElement, function () { eventOccured(); });

Powered by Google App Engine
This is Rietveld 408576698