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

Side by Side Diff: content/test/webrtc_content_browsertest_base.cc

Issue 2052633002: Extend the ToRenderFrameHost magic to FrameTreeNode* and Shell* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix induced script bug. Created 4 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/test/webrtc_content_browsertest_base.h" 5 #include "content/test/webrtc_content_browsertest_base.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/strings/stringprintf.h" 8 #include "base/strings/stringprintf.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 void WebRtcContentBrowserTest::AppendUseFakeUIForMediaStreamFlag() { 56 void WebRtcContentBrowserTest::AppendUseFakeUIForMediaStreamFlag() {
57 base::CommandLine::ForCurrentProcess()->AppendSwitch( 57 base::CommandLine::ForCurrentProcess()->AppendSwitch(
58 switches::kUseFakeUIForMediaStream); 58 switches::kUseFakeUIForMediaStream);
59 } 59 }
60 60
61 // Executes |javascript|. The script is required to use 61 // Executes |javascript|. The script is required to use
62 // window.domAutomationController.send to send a string value back to here. 62 // window.domAutomationController.send to send a string value back to here.
63 std::string WebRtcContentBrowserTest::ExecuteJavascriptAndReturnResult( 63 std::string WebRtcContentBrowserTest::ExecuteJavascriptAndReturnResult(
64 const std::string& javascript) { 64 const std::string& javascript) {
65 std::string result; 65 std::string result;
66 EXPECT_TRUE(ExecuteScriptAndExtractString( 66 EXPECT_TRUE(ExecuteScriptAndExtractString(shell(), javascript, &result))
67 shell()->web_contents(), javascript, &result)) 67 << "Failed to execute javascript " << javascript << ".";
68 << "Failed to execute javascript " << javascript << ".";
69 return result; 68 return result;
70 } 69 }
71 70
72 void WebRtcContentBrowserTest::MakeTypicalCall(const std::string& javascript, 71 void WebRtcContentBrowserTest::MakeTypicalCall(const std::string& javascript,
73 const std::string& html_file) { 72 const std::string& html_file) {
74 ASSERT_TRUE(embedded_test_server()->Start()); 73 ASSERT_TRUE(embedded_test_server()->Start());
75 74
76 GURL url(embedded_test_server()->GetURL(html_file)); 75 GURL url(embedded_test_server()->GetURL(html_file));
77 NavigateToURL(shell(), url); 76 NavigateToURL(shell(), url);
78 77
(...skipping 27 matching lines...) Expand all
106 function_name, 105 function_name,
107 min_width, 106 min_width,
108 max_width, 107 max_width,
109 min_height, 108 min_height,
110 max_height, 109 max_height,
111 min_frame_rate, 110 min_frame_rate,
112 max_frame_rate); 111 max_frame_rate);
113 } 112 }
114 113
115 } // namespace content 114 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698