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

Unified Diff: content/browser/media/webrtc_browsertest.cc

Issue 190563002: Refactored how WebRTC content browser tests talk to their javascript. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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
Index: content/browser/media/webrtc_browsertest.cc
diff --git a/content/browser/media/webrtc_browsertest.cc b/content/browser/media/webrtc_browsertest.cc
index 8ecc8b2fd22787620912a2895a93233bedd16253..4a8a4c0bcb7ef7072d800ca837c9220c43a20aab 100644
--- a/content/browser/media/webrtc_browsertest.cc
+++ b/content/browser/media/webrtc_browsertest.cc
@@ -34,17 +34,7 @@ class WebRtcBrowserTest : public WebRtcContentBrowserTest {
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();"));
-#endif
-
- ASSERT_TRUE(ExecuteJavascript(javascript));
- ExpectTitle("OK");
+ ExecuteJavascriptAndWaitForOk(javascript);
}
};
@@ -331,7 +321,7 @@ IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CallWithAecDump) {
GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
NavigateToURL(shell(), url);
- ExecuteTestAndWaitForOk("call({video: true, audio: true});");
+ ExecuteJavascriptAndWaitForOk("call({video: true, audio: true});");
EXPECT_TRUE(base::PathExists(dump_file));
int64 file_size = 0;
@@ -367,7 +357,7 @@ IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest,
GURL url(embedded_test_server()->GetURL("/media/peerconnection-call.html"));
NavigateToURL(shell(), url);
- ExecuteTestAndWaitForOk("call({video: true, audio: true});");
+ ExecuteJavascriptAndWaitForOk("call({video: true, audio: true});");
EXPECT_TRUE(base::PathExists(dump_file));
int64 file_size = 0;

Powered by Google App Engine
This is Rietveld 408576698