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(); }); |