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

Unified Diff: chrome/browser/media/chrome_webrtc_webcam_browsertest.cc

Issue 260333004: Re-enabling WebRTC HD cam tests after Logitech C920 fix. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Did some light refactoring to clean up the code. Created 6 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/chrome_webrtc_webcam_browsertest.cc
diff --git a/chrome/browser/media/chrome_webrtc_webcam_browsertest.cc b/chrome/browser/media/chrome_webrtc_webcam_browsertest.cc
index 0f545b611623ba9c3fcada0feaa05d7d8dfb53cb..92457f5282e4352c8b084eeb9ca826fbaf086c06 100644
--- a/chrome/browser/media/chrome_webrtc_webcam_browsertest.cc
+++ b/chrome/browser/media/chrome_webrtc_webcam_browsertest.cc
@@ -32,6 +32,17 @@ class WebRtcWebcamBrowserTest : public WebRtcTestBase {
virtual void SetUpInProcessBrowserTestFixture() OVERRIDE {
DetectErrorsInJavaScript(); // Look for errors in our rather complex js.
}
+
+ protected:
+ std::string GetUserMediaAndGetStreamSize(content::WebContents* tab,
+ const std::string& constraints) {
+ GetUserMediaWithSpecificConstraintsAndAccept(tab, constraints);
+ StartDetectingVideo(tab, "local-view");
+ WaitForVideoToPlay(tab);
+ std::string actual_stream_size = GetStreamSize(tab, "local-view");
+ CloseLastLocalStream(tab);
+ return actual_stream_size;
+ }
};
IN_PROC_BROWSER_TEST_F(WebRtcWebcamBrowserTest,
@@ -47,36 +58,14 @@ IN_PROC_BROWSER_TEST_F(WebRtcWebcamBrowserTest,
return;
}
- GetUserMediaWithSpecificConstraintsAndAccept(tab,
- kAudioVideoCallConstraintsVGA);
- StartDetectingVideo(tab, "local-view");
- WaitForVideoToPlay(tab);
- EXPECT_EQ("640x480", GetStreamSize(tab, "local-view"));
- CloseLastLocalStream(tab);
- GetUserMediaWithSpecificConstraintsAndAccept(tab,
- kAudioVideoCallConstraintsQVGA);
- StartDetectingVideo(tab, "local-view");
- WaitForVideoToPlay(tab);
- EXPECT_EQ("320x240", GetStreamSize(tab, "local-view"));
- CloseLastLocalStream(tab);
- GetUserMediaWithSpecificConstraintsAndAccept(tab,
- kAudioVideoCallConstraints360p);
- StartDetectingVideo(tab, "local-view");
- WaitForVideoToPlay(tab);
- EXPECT_EQ("640x360", GetStreamSize(tab, "local-view"));
- CloseLastLocalStream(tab);
-
- // Broken on all platforms for C920 webcams: see http://crbug.com/360512.
-// GetUserMediaWithSpecificConstraintsAndAccept(tab,
-// kAudioVideoCallConstraints720p);
-// StartDetectingVideo(tab, "local-view");
-// WaitForVideoToPlay(tab);
-// EXPECT_EQ("1280x720", GetStreamSize(tab, "local-view"));
-// CloseLastLocalStream(tab);
-// GetUserMediaWithSpecificConstraintsAndAccept(tab,
-// kAudioVideoCallConstraints1080p);
-// StartDetectingVideo(tab, "local-view");
-// WaitForVideoToPlay(tab);
-// EXPECT_EQ("1920x1080", GetStreamSize(tab, "local-view"));
-// CloseLastLocalStream(tab);
+ EXPECT_EQ("640x480",
+ GetUserMediaAndGetStreamSize(tab, kAudioVideoCallConstraintsVGA));
+ EXPECT_EQ("320x240",
+ GetUserMediaAndGetStreamSize(tab, kAudioVideoCallConstraintsQVGA));
+ EXPECT_EQ("640x360",
+ GetUserMediaAndGetStreamSize(tab, kAudioVideoCallConstraints360p));
+ EXPECT_EQ("1280x720",
+ GetUserMediaAndGetStreamSize(tab, kAudioVideoCallConstraints720p));
+ EXPECT_EQ("1920x1080",
+ GetUserMediaAndGetStreamSize(tab, kAudioVideoCallConstraints1080p));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698