OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/command_line.h" | 5 #include "base/command_line.h" |
6 #include "base/debug/trace_event_impl.h" | 6 #include "base/debug/trace_event_impl.h" |
7 #include "base/json/json_reader.h" | 7 #include "base/json/json_reader.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 "base/values.h" | 10 #include "base/values.h" |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 // window.domAutomationController.send to send a string value back to here. | 217 // window.domAutomationController.send to send a string value back to here. |
218 std::string ExecuteJavascriptAndReturnResult(const std::string& javascript) { | 218 std::string ExecuteJavascriptAndReturnResult(const std::string& javascript) { |
219 std::string result; | 219 std::string result; |
220 EXPECT_TRUE(ExecuteScriptAndExtractString(shell()->web_contents(), | 220 EXPECT_TRUE(ExecuteScriptAndExtractString(shell()->web_contents(), |
221 javascript, | 221 javascript, |
222 &result)); | 222 &result)); |
223 return result; | 223 return result; |
224 } | 224 } |
225 | 225 |
226 void ExpectTitle(const std::string& expected_title) const { | 226 void ExpectTitle(const std::string& expected_title) const { |
227 base::string16 expected_title16(ASCIIToUTF16(expected_title)); | 227 base::string16 expected_title16(base::ASCIIToUTF16(expected_title)); |
228 TitleWatcher title_watcher(shell()->web_contents(), expected_title16); | 228 TitleWatcher title_watcher(shell()->web_contents(), expected_title16); |
229 EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle()); | 229 EXPECT_EQ(expected_title16, title_watcher.WaitAndGetTitle()); |
230 } | 230 } |
231 }; | 231 }; |
232 | 232 |
233 // These tests will all make a getUserMedia call with different constraints and | 233 // These tests will all make a getUserMedia call with different constraints and |
234 // see that the success callback is called. If the error callback is called or | 234 // see that the success callback is called. If the error callback is called or |
235 // none of the callbacks are called the tests will simply time out and fail. | 235 // none of the callbacks are called the tests will simply time out and fail. |
236 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, GetVideoStreamAndStop) { | 236 IN_PROC_BROWSER_TEST_F(WebrtcBrowserTest, GetVideoStreamAndStop) { |
237 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); | 237 ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
(...skipping 652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
890 EXPECT_TRUE(base::PathExists(dump_file)); | 890 EXPECT_TRUE(base::PathExists(dump_file)); |
891 int64 file_size = 0; | 891 int64 file_size = 0; |
892 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size)); | 892 EXPECT_TRUE(base::GetFileSize(dump_file, &file_size)); |
893 EXPECT_EQ(0, file_size); | 893 EXPECT_EQ(0, file_size); |
894 | 894 |
895 base::DeleteFile(dump_file, false); | 895 base::DeleteFile(dump_file, false); |
896 } | 896 } |
897 | 897 |
898 | 898 |
899 } // namespace content | 899 } // namespace content |
OLD | NEW |