blob: 8d0112c9b1ad6518aed636a4d0c576f478b22a11 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "content/test/content_browser_test.h"
namespace base {
class CommandLine;
}
namespace content {
// Contains stuff WebRTC browsertests have in common.
class WebRtcContentBrowserTest: public ContentBrowserTest {
public:
virtual void SetUpCommandLine(base::CommandLine* command_line) OVERRIDE;
virtual void SetUp() OVERRIDE;
protected:
// Executes |javascript|. The script is required to use
// window.domAutomationController.send to send a string value back to here.
std::string ExecuteJavascriptAndReturnResult(
const std::string& javascript);
// Waits for the javascript to return OK via the automation controller.
// If the javascript returns != OK or times out, we fail the test.
void ExecuteJavascriptAndWaitForOk(const std::string& javascript);
// Generates javascript code for a getUserMedia call.
std::string GenerateGetUserMediaCall(const char* function_name,
int min_width,
int max_width,
int min_height,
int max_height,
int min_frame_rate,
int max_frame_rate) const;
};
} // namespace content
|