OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/test/content_browser_test.h" |
| 6 |
| 7 class CommandLine; |
| 8 |
| 9 namespace content { |
| 10 |
| 11 // Contains stuff WebRTC browsertests have in common. |
| 12 class WebRtcContentBrowserTest: public ContentBrowserTest { |
| 13 public: |
| 14 virtual void SetUpCommandLine(CommandLine* command_line) OVERRIDE; |
| 15 virtual void SetUp() OVERRIDE; |
| 16 |
| 17 protected: |
| 18 // Executes |javascript| and returns after it has been executed. |
| 19 bool ExecuteJavascript(const std::string& javascript); |
| 20 |
| 21 // Executes |javascript|. The script is required to use |
| 22 // window.domAutomationController.send to send a string value back to here. |
| 23 std::string ExecuteJavascriptAndReturnResult( |
| 24 const std::string& javascript); |
| 25 |
| 26 // Waits for the page title to be set to |expected_title|. |
| 27 void ExpectTitle(const std::string& expected_title) const; |
| 28 |
| 29 // Generates javascript code for a getUserMedia call. |
| 30 std::string GenerateGetUserMediaCall(const char* function_name, |
| 31 int min_width, |
| 32 int max_width, |
| 33 int min_height, |
| 34 int max_height, |
| 35 int min_frame_rate, |
| 36 int max_frame_rate) const; |
| 37 }; |
| 38 |
| 39 } // namespace content |
OLD | NEW |