OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |