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

Unified Diff: chrome/test/data/webrtc/video_detector.js

Issue 2309823005: WIP: Add Firefox interop tests for different formats.
Patch Set: Rebase. Created 3 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 | « chrome/browser/media/webrtc/webrtc_browsertest_base.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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).
« no previous file with comments | « chrome/browser/media/webrtc/webrtc_browsertest_base.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698