Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(36)

Side by Side Diff: components/test_runner/web_test_proxy.h

Issue 1839853002: Moving remaining mocks from WebTestProxyBase into TestRunner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@splitting-web-view-test-client
Patch Set: Rebasing... Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « components/test_runner/test_runner.cc ('k') | components/test_runner/web_test_proxy.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_
6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ 6 #define COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_
7 7
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 13 matching lines...) Expand all
24 #include "third_party/WebKit/public/web/WebNavigationPolicy.h" 24 #include "third_party/WebKit/public/web/WebNavigationPolicy.h"
25 #include "third_party/WebKit/public/web/WebTextDirection.h" 25 #include "third_party/WebKit/public/web/WebTextDirection.h"
26 #include "third_party/WebKit/public/web/WebViewClient.h" 26 #include "third_party/WebKit/public/web/WebViewClient.h"
27 #include "third_party/WebKit/public/web/WebWidgetClient.h" 27 #include "third_party/WebKit/public/web/WebWidgetClient.h"
28 28
29 namespace blink { 29 namespace blink {
30 class WebDragData; 30 class WebDragData;
31 class WebFileChooserCompletion; 31 class WebFileChooserCompletion;
32 class WebImage; 32 class WebImage;
33 class WebLocalFrame; 33 class WebLocalFrame;
34 class WebSpellCheckClient;
35 class WebString; 34 class WebString;
36 class WebView; 35 class WebView;
37 class WebWidget; 36 class WebWidget;
38 struct WebFileChooserParams; 37 struct WebFileChooserParams;
39 struct WebPoint; 38 struct WebPoint;
40 struct WebWindowFeatures; 39 struct WebWindowFeatures;
41 } 40 }
42 41
43 namespace test_runner { 42 namespace test_runner {
44 43
45 class MockCredentialManagerClient;
46 class SpellCheckClient;
47 class TestInterfaces; 44 class TestInterfaces;
48 class WebTestDelegate; 45 class WebTestDelegate;
49 class WebTestInterfaces; 46 class WebTestInterfaces;
50 47
51 // WebTestProxyBase is the "brain" of WebTestProxy in the sense that 48 // WebTestProxyBase is the "brain" of WebTestProxy in the sense that
52 // WebTestProxy does the bridge between RenderViewImpl and WebTestProxyBase and 49 // WebTestProxy does the bridge between RenderViewImpl and WebTestProxyBase and
53 // when it requires a behavior to be different from the usual, it will call 50 // when it requires a behavior to be different from the usual, it will call
54 // WebTestProxyBase that implements the expected behavior. 51 // WebTestProxyBase that implements the expected behavior.
55 // See WebTestProxy class comments for more information. 52 // See WebTestProxy class comments for more information.
56 class TEST_RUNNER_EXPORT WebTestProxyBase { 53 class TEST_RUNNER_EXPORT WebTestProxyBase {
(...skipping 14 matching lines...) Expand all
71 68
72 void set_view_test_client(scoped_ptr<WebViewTestClient> view_test_client) { 69 void set_view_test_client(scoped_ptr<WebViewTestClient> view_test_client) {
73 DCHECK(view_test_client); 70 DCHECK(view_test_client);
74 DCHECK(!view_test_client_); 71 DCHECK(!view_test_client_);
75 view_test_client_ = std::move(view_test_client); 72 view_test_client_ = std::move(view_test_client);
76 } 73 }
77 74
78 void SetInterfaces(WebTestInterfaces* interfaces); 75 void SetInterfaces(WebTestInterfaces* interfaces);
79 void SetDelegate(WebTestDelegate* delegate); 76 void SetDelegate(WebTestDelegate* delegate);
80 77
81 blink::WebSpellCheckClient* GetSpellCheckClient() const;
82
83 std::string DumpBackForwardLists(); 78 std::string DumpBackForwardLists();
84 79
85 void LayoutAndPaintAsyncThen(const base::Closure& callback); 80 void LayoutAndPaintAsyncThen(const base::Closure& callback);
86 81
87 void GetScreenOrientationForTesting(blink::WebScreenInfo&); 82 void GetScreenOrientationForTesting(blink::WebScreenInfo&);
88 MockCredentialManagerClient* GetCredentialManagerClientMock();
89
90 void PostSpellCheckEvent(const blink::WebString& event_name);
91 83
92 protected: 84 protected:
93 WebTestProxyBase(); 85 WebTestProxyBase();
94 ~WebTestProxyBase(); 86 ~WebTestProxyBase();
95 87
96 blink::WebViewClient* view_test_client() { return view_test_client_.get(); } 88 blink::WebViewClient* view_test_client() { return view_test_client_.get(); }
97 89
98 private: 90 private:
99 TestInterfaces* test_interfaces_; 91 TestInterfaces* test_interfaces_;
100 WebTestDelegate* delegate_; 92 WebTestDelegate* delegate_;
101 blink::WebView* web_view_; 93 blink::WebView* web_view_;
102 blink::WebWidget* web_widget_; 94 blink::WebWidget* web_widget_;
103 scoped_ptr<WebViewTestClient> view_test_client_; 95 scoped_ptr<WebViewTestClient> view_test_client_;
104 96
105 scoped_ptr<SpellCheckClient> spellcheck_;
106 scoped_ptr<MockCredentialManagerClient> credential_manager_client_;
107
108 DISALLOW_COPY_AND_ASSIGN(WebTestProxyBase); 97 DISALLOW_COPY_AND_ASSIGN(WebTestProxyBase);
109 }; 98 };
110 99
111 // WebTestProxy is used during LayoutTests and always instantiated, at time of 100 // WebTestProxy is used during LayoutTests and always instantiated, at time of
112 // writing with Base=RenderViewImpl. It does not directly inherit from it for 101 // writing with Base=RenderViewImpl. It does not directly inherit from it for
113 // layering purposes. 102 // layering purposes.
114 // The intent of that class is to wrap RenderViewImpl for tests purposes in 103 // The intent of that class is to wrap RenderViewImpl for tests purposes in
115 // order to reduce the amount of test specific code in the production code. 104 // order to reduce the amount of test specific code in the production code.
116 // WebTestProxy is only doing the glue between RenderViewImpl and 105 // WebTestProxy is only doing the glue between RenderViewImpl and
117 // WebTestProxyBase, that means that there is no logic living in this class 106 // WebTestProxyBase, that means that there is no logic living in this class
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
218 207
219 private: 208 private:
220 virtual ~WebTestProxy() {} 209 virtual ~WebTestProxy() {}
221 210
222 DISALLOW_COPY_AND_ASSIGN(WebTestProxy); 211 DISALLOW_COPY_AND_ASSIGN(WebTestProxy);
223 }; 212 };
224 213
225 } // namespace test_runner 214 } // namespace test_runner
226 215
227 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_ 216 #endif // COMPONENTS_TEST_RUNNER_WEB_TEST_PROXY_H_
OLDNEW
« no previous file with comments | « components/test_runner/test_runner.cc ('k') | components/test_runner/web_test_proxy.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698