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.
5 #ifndef COMPONENTS_TEST_RUNNER_TEST_INTERFACES_H_
6 #define COMPONENTS_TEST_RUNNER_TEST_INTERFACES_H_
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/memory/weak_ptr.h"
13 #include "components/test_runner/mock_web_theme_engine.h"
14 #include "third_party/WebKit/public/platform/WebNonCopyable.h"
23 namespace test_runner
{
25 class AccessibilityController
;
26 class AppBannerClient
;
28 class GamepadController
;
30 class TextInputController
;
31 class WebTestDelegate
;
32 class WebTestProxyBase
;
34 class TestInterfaces
{
39 void SetWebView(blink::WebView
* web_view
, WebTestProxyBase
* proxy
);
40 void SetDelegate(WebTestDelegate
* delegate
);
41 void BindTo(blink::WebFrame
* frame
);
42 void ResetTestHelperControllers();
44 void SetTestIsRunning(bool running
);
45 void ConfigureForTestWithURL(const blink::WebURL
& test_url
,
46 bool generate_pixels
);
47 void SetAppBannerClient(AppBannerClient
* app_banner_client
);
49 void WindowOpened(WebTestProxyBase
* proxy
);
50 void WindowClosed(WebTestProxyBase
* proxy
);
52 AccessibilityController
* GetAccessibilityController();
53 EventSender
* GetEventSender();
54 TestRunner
* GetTestRunner();
55 WebTestDelegate
* GetDelegate();
56 WebTestProxyBase
* GetProxy();
57 const std::vector
<WebTestProxyBase
*>& GetWindowList();
58 blink::WebThemeEngine
* GetThemeEngine();
59 AppBannerClient
* GetAppBannerClient();
62 scoped_ptr
<AccessibilityController
> accessibility_controller_
;
63 scoped_ptr
<EventSender
> event_sender_
;
64 base::WeakPtr
<GamepadController
> gamepad_controller_
;
65 scoped_ptr
<TextInputController
> text_input_controller_
;
66 scoped_ptr
<TestRunner
> test_runner_
;
67 WebTestDelegate
* delegate_
;
68 WebTestProxyBase
* proxy_
;
69 AppBannerClient
* app_banner_client_
;
71 std::vector
<WebTestProxyBase
*> window_list_
;
72 scoped_ptr
<MockWebThemeEngine
> theme_engine_
;
74 DISALLOW_COPY_AND_ASSIGN(TestInterfaces
);
77 } // namespace test_runner
79 #endif // COMPONENTS_TEST_RUNNER_TEST_INTERFACES_H_