summaryrefslogtreecommitdiffstats
path: root/chrome/browser/media/webrtc_browsertest_base.cc
diff options
context:
space:
mode:
authorphoglund@chromium.org <phoglund@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-27 15:51:24 +0000
committerphoglund@chromium.org <phoglund@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-27 15:51:24 +0000
commite4910dd10fc97f81fba19fb1dd094620fd209ca2 (patch)
treee601230fcb52c0b6836f010879da3c5b44c679d7 /chrome/browser/media/webrtc_browsertest_base.cc
parent7b948369325c1bc807788f8d6a2d9a3923a0394b (diff)
downloadchromium_src-e4910dd10fc97f81fba19fb1dd094620fd209ca2.zip
chromium_src-e4910dd10fc97f81fba19fb1dd094620fd209ca2.tar.gz
chromium_src-e4910dd10fc97f81fba19fb1dd094620fd209ca2.tar.bz2
Switched main WebRTC browser tests to use a more realistic video.
After switching to fake device flags instead of software webcams, we noticed a ton of video-related metrics changed. This is because the spinning green ball is an unrealistic encode/decode example. This patch will use the new fake device file flag to play a more realistic video. BUG=352261,343504 Review URL: https://codereview.chromium.org/211123004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@259887 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/media/webrtc_browsertest_base.cc')
-rw-r--r--chrome/browser/media/webrtc_browsertest_base.cc33
1 files changed, 17 insertions, 16 deletions
diff --git a/chrome/browser/media/webrtc_browsertest_base.cc b/chrome/browser/media/webrtc_browsertest_base.cc
index 21c18b5..fafaacc 100644
--- a/chrome/browser/media/webrtc_browsertest_base.cc
+++ b/chrome/browser/media/webrtc_browsertest_base.cc
@@ -91,8 +91,8 @@ void WebRtcTestBase::GetUserMediaWithSpecificConstraintsAndAccept(
// Wait for WebRTC to call the success callback.
const char kOkGotStream[] = "ok-got-stream";
- EXPECT_TRUE(PollingWaitUntil("obtainGetUserMediaResult()", kOkGotStream,
- tab_contents));
+ EXPECT_TRUE(test::PollingWaitUntil("obtainGetUserMediaResult()", kOkGotStream,
+ tab_contents));
}
void WebRtcTestBase::GetUserMediaAndDeny(content::WebContents* tab_contents) {
@@ -108,8 +108,9 @@ void WebRtcTestBase::GetUserMediaWithSpecificConstraintsAndDeny(
CloseInfoBarInTab(tab_contents, infobar);
// Wait for WebRTC to call the fail callback.
- EXPECT_TRUE(PollingWaitUntil("obtainGetUserMediaResult()",
- kFailedWithPermissionDeniedError, tab_contents));
+ EXPECT_TRUE(test::PollingWaitUntil("obtainGetUserMediaResult()",
+ kFailedWithPermissionDeniedError,
+ tab_contents));
}
void WebRtcTestBase::GetUserMediaAndDismiss(
@@ -120,9 +121,9 @@ void WebRtcTestBase::GetUserMediaAndDismiss(
CloseInfoBarInTab(tab_contents, infobar);
// A dismiss should be treated like a deny.
- EXPECT_TRUE(PollingWaitUntil("obtainGetUserMediaResult()",
- kFailedWithPermissionDismissedError,
- tab_contents));
+ EXPECT_TRUE(test::PollingWaitUntil("obtainGetUserMediaResult()",
+ kFailedWithPermissionDismissedError,
+ tab_contents));
}
void WebRtcTestBase::GetUserMedia(content::WebContents* tab_contents,
@@ -232,7 +233,7 @@ void WebRtcTestBase::ConnectToPeerConnectionServer(
content::WebContents* tab_contents) const {
std::string javascript = base::StringPrintf(
"connect('http://localhost:%s', '%s');",
- PeerConnectionServerRunner::kDefaultPort, peer_name.c_str());
+ test::PeerConnectionServerRunner::kDefaultPort, peer_name.c_str());
EXPECT_EQ("ok-connected", ExecuteJavascript(javascript, tab_contents));
}
@@ -247,10 +248,10 @@ void WebRtcTestBase::EstablishCall(content::WebContents* from_tab,
EXPECT_EQ("ok-negotiating", ExecuteJavascript("negotiateCall()", from_tab));
// Ensure the call gets up on both sides.
- EXPECT_TRUE(PollingWaitUntil("getPeerConnectionReadyState()",
- "active", from_tab));
- EXPECT_TRUE(PollingWaitUntil("getPeerConnectionReadyState()",
- "active", to_tab));
+ EXPECT_TRUE(test::PollingWaitUntil("getPeerConnectionReadyState()",
+ "active", from_tab));
+ EXPECT_TRUE(test::PollingWaitUntil("getPeerConnectionReadyState()",
+ "active", to_tab));
}
void WebRtcTestBase::HangUp(content::WebContents* from_tab) const {
@@ -259,8 +260,8 @@ void WebRtcTestBase::HangUp(content::WebContents* from_tab) const {
void WebRtcTestBase::WaitUntilHangupVerified(
content::WebContents* tab_contents) const {
- EXPECT_TRUE(PollingWaitUntil("getPeerConnectionReadyState()",
- "no-peer-connection", tab_contents));
+ EXPECT_TRUE(test::PollingWaitUntil("getPeerConnectionReadyState()",
+ "no-peer-connection", tab_contents));
}
void WebRtcTestBase::DetectErrorsInJavaScript() {
@@ -277,6 +278,6 @@ void WebRtcTestBase::StartDetectingVideo(
void WebRtcTestBase::WaitForVideoToPlay(
content::WebContents* tab_contents) const {
- EXPECT_TRUE(PollingWaitUntil("isVideoPlaying()", "video-playing",
- tab_contents));
+ EXPECT_TRUE(test::PollingWaitUntil("isVideoPlaying()", "video-playing",
+ tab_contents));
}