| OLD | NEW |
| (Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "content/public/test/content_browser_test.h" |
| 6 |
| 7 namespace base { |
| 8 class CommandLine; |
| 9 } |
| 10 |
| 11 namespace content { |
| 12 |
| 13 // Contains stuff WebRTC browsertests have in common. |
| 14 class WebRtcContentBrowserTest: public ContentBrowserTest { |
| 15 public: |
| 16 void SetUpCommandLine(base::CommandLine* command_line) override; |
| 17 void SetUp() override; |
| 18 void TearDown() override; |
| 19 |
| 20 protected: |
| 21 // Helper function to append "--use-fake-ui-for-media-stream". |
| 22 void AppendUseFakeUIForMediaStreamFlag(); |
| 23 |
| 24 // Executes |javascript|. The script is required to use |
| 25 // window.domAutomationController.send to send a string value back to here. |
| 26 std::string ExecuteJavascriptAndReturnResult( |
| 27 const std::string& javascript); |
| 28 |
| 29 // Waits for the javascript to return OK via the automation controller. |
| 30 // If the javascript returns != OK or times out, we fail the test. |
| 31 void ExecuteJavascriptAndWaitForOk(const std::string& javascript); |
| 32 |
| 33 // Execute a typical javascript call after having started the webserver. |
| 34 void MakeTypicalCall(const std::string& javascript, |
| 35 const std::string& html_file); |
| 36 |
| 37 // Generates javascript code for a getUserMedia call. |
| 38 std::string GenerateGetUserMediaCall(const char* function_name, |
| 39 int min_width, |
| 40 int max_width, |
| 41 int min_height, |
| 42 int max_height, |
| 43 int min_frame_rate, |
| 44 int max_frame_rate) const; |
| 45 }; |
| 46 |
| 47 } // namespace content |
| OLD | NEW |