| Index: chrome/test/data/webrtc/video_detector.js
|
| diff --git a/chrome/test/data/webrtc/video_detector.js b/chrome/test/data/webrtc/video_detector.js
|
| index 4c966101a78df59e7b195b01d4241f849df9f67b..fb1d5a50deb695a2c3cde67055c383507fb0fc38 100644
|
| --- a/chrome/test/data/webrtc/video_detector.js
|
| +++ b/chrome/test/data/webrtc/video_detector.js
|
| @@ -78,6 +78,31 @@ function isVideoPlaying() {
|
| returnToTest('video-not-playing');
|
| }
|
|
|
| +function checkVideoFormat(format) {
|
| + var checkFormat = function(response) {
|
| + var stats = response.result();
|
| +
|
| + var txVideo = getStatsReport(stats, "ssrc", "googFirsReceived");
|
| + var rxVideo = getStatsReport(stats, "ssrc", "googFirsSent");
|
| +
|
| + var txFormat = txVideo.stat("googCodecName");
|
| + var rxFormat = rxVideo.stat("googCodecName");
|
| +
|
| + if (txFormat != format) {
|
| + throw new failTest(
|
| + "Wrong video tx format " + txFormat + " expected " + format);
|
| + }
|
| + if (rxFormat != format) {
|
| + throw new failTest(
|
| + "Wrong video rx format " + rxFormat + " expected " + format);
|
| + }
|
| +
|
| + returnToTest('ok-correct-format');
|
| + }
|
| +
|
| + appController.infoBox_.call_.getPeerConnectionStats(checkFormat);
|
| +}
|
| +
|
| /**
|
| * Queries for the stream size (not necessarily the size at which the video tag
|
| * is rendered).
|
|
|