Commit 8fd45f07 authored by phoglund@chromium.org's avatar phoglund@chromium.org

Now explicitly hanging up in AppRTC test.

Setting no-try since this test doesn't run on trybots anyway.

BUG=373252,377383
NOTRY=True

Review URL: https://codereview.chromium.org/301653003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272952 0039d316-1c4b-4281-b951-d872f2087c98
parent 34ed4fe3
......@@ -122,6 +122,13 @@ class WebRtcApprtcBrowserTest : public WebRtcTestBase {
return test::PollingWaitUntil(javascript, "1", tab_contents);
}
bool WaitForCallToHangUp(content::WebContents* tab_contents) {
// Apprtc will set remoteVideo.style.opacity to 1 when the call comes up.
std::string javascript =
"window.domAutomationController.send(remoteVideo.style.opacity)";
return test::PollingWaitUntil(javascript, "0", tab_contents);
}
bool EvalInJavascriptFile(content::WebContents* tab_contents,
const base::FilePath& path) {
std::string javascript;
......@@ -152,6 +159,11 @@ class WebRtcApprtcBrowserTest : public WebRtcTestBase {
return true;
}
bool HangUpApprtcCall(content::WebContents* tab_contents) {
// This is the same as clicking the Hangup button in the AppRTC call.
return content::ExecuteScript(tab_contents, "onHangup()");
}
base::FilePath GetSourceDir() {
base::FilePath source_dir;
PathService::Get(base::DIR_SOURCE_ROOT, &source_dir);
......@@ -231,6 +243,11 @@ IN_PROC_BROWSER_TEST_F(WebRtcApprtcBrowserTest, MANUAL_WorksOnApprtc) {
ASSERT_TRUE(DetectRemoteVideoPlaying(left_tab));
ASSERT_TRUE(DetectRemoteVideoPlaying(right_tab));
ASSERT_TRUE(HangUpApprtcCall(left_tab));
ASSERT_TRUE(WaitForCallToHangUp(left_tab));
ASSERT_TRUE(WaitForCallToHangUp(right_tab));
}
#if defined(OS_LINUX)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment