forked from fujunwei/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathweb_test_interfaces.h
More file actions
76 lines (58 loc) · 2.22 KB
/
web_test_interfaces.h
File metadata and controls
76 lines (58 loc) · 2.22 KB
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
// Copyright 2013 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.
#ifndef CONTENT_SHELL_TEST_RUNNER_WEB_TEST_INTERFACES_H_
#define CONTENT_SHELL_TEST_RUNNER_WEB_TEST_INTERFACES_H_
#include <memory>
#include <vector>
#include "base/macros.h"
#include "content/shell/test_runner/test_runner_export.h"
namespace blink {
class WebLocalFrameClient;
class WebRTCPeerConnectionHandler;
class WebRTCPeerConnectionHandlerClient;
class WebThemeEngine;
class WebURL;
class WebView;
}
namespace test_runner {
class TestInterfaces;
class WebFrameTestClient;
class WebFrameTestProxy;
class WebTestDelegate;
class WebViewTestProxy;
class WebTestRunner;
class TEST_RUNNER_EXPORT WebTestInterfaces {
public:
WebTestInterfaces();
~WebTestInterfaces();
void SetMainView(blink::WebView* web_view);
void SetDelegate(WebTestDelegate* delegate);
void ResetAll();
bool TestIsRunning();
void SetTestIsRunning(bool running);
// Configures the renderer for the test, based on |test_url| and
// |procotol_mode|.
void ConfigureForTestWithURL(const blink::WebURL& test_url,
bool protocol_mode);
WebTestRunner* TestRunner();
blink::WebThemeEngine* ThemeEngine();
std::unique_ptr<blink::WebRTCPeerConnectionHandler>
CreateWebRTCPeerConnectionHandler(
blink::WebRTCPeerConnectionHandlerClient* client);
TestInterfaces* GetTestInterfaces();
// Creates a WebLocalFrameClient implementation providing test behavior (i.e.
// forwarding javascript console output to the test harness). The caller
// should guarantee that the returned object won't be used beyond the lifetime
// of WebTestInterfaces and/or the lifetime of |web_view_test_proxy|.
std::unique_ptr<WebFrameTestClient> CreateWebFrameTestClient(
WebViewTestProxy* web_view_test_proxy,
WebFrameTestProxy* web_frame_test_proxy);
// Gets a list of currently opened windows created by the current test.
std::vector<blink::WebView*> GetWindowList();
private:
std::unique_ptr<TestInterfaces> interfaces_;
DISALLOW_COPY_AND_ASSIGN(WebTestInterfaces);
};
} // namespace test_runner
#endif // CONTENT_SHELL_TEST_RUNNER_WEB_TEST_INTERFACES_H_