Index: content/browser/media/webrtc_browsertest.cc |
diff --git a/content/browser/media/webrtc_browsertest.cc b/content/browser/media/webrtc_browsertest.cc |
index aecd07fe47683f6e912a76d6eef5cfcb8586628d..156e60f4962a5ed4358e428d6633a39b0f4a3af8 100644 |
--- a/content/browser/media/webrtc_browsertest.cc |
+++ b/content/browser/media/webrtc_browsertest.cc |
@@ -228,7 +228,10 @@ class WebrtcBrowserTest: public ContentBrowserTest { |
GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); |
NavigateToURL(shell(), url); |
+ ExecuteTestAndWaitForOk(javascript); |
+ } |
+ void ExecuteTestAndWaitForOk(const std::string& javascript) { |
#if defined (OS_ANDROID) |
// Always force iSAC 16K on Android for now (Opus is broken). |
ASSERT_TRUE(ExecuteJavascript("forceIsac16KInSdp();")); |
@@ -731,9 +734,7 @@ IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, MAYBE_CallWithAecDump) { |
GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); |
NavigateToURL(shell(), url); |
- |
- EXPECT_TRUE(ExecuteJavascript("call({video: true, audio: true});")); |
- ExpectTitle("OK"); |
+ ExecuteTestAndWaitForOk("call({video: true, audio: true});"); |
EXPECT_TRUE(base::PathExists(dump_file)); |
int64 file_size = 0; |
@@ -769,9 +770,7 @@ IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, |
GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html")); |
NavigateToURL(shell(), url); |
- |
- EXPECT_TRUE(ExecuteJavascript("call({video: true, audio: true});")); |
- ExpectTitle("OK"); |
+ ExecuteTestAndWaitForOk("call({video: true, audio: true});"); |
EXPECT_TRUE(base::PathExists(dump_file)); |
int64 file_size = 0; |