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

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

Issue 2171503005: Rename WebTestProxy to WebViewTestProxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing comments Created 4 years, 5 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_FRAME_TEST_CLIENT_H_ 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_CLIENT_H_
6 #define COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_CLIENT_H_ 6 #define COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_CLIENT_H_
7 7
8 #include <map> 8 #include <map>
9 #include <string> 9 #include <string>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "third_party/WebKit/public/web/WebFrameClient.h" 12 #include "third_party/WebKit/public/web/WebFrameClient.h"
13 13
14 namespace test_runner { 14 namespace test_runner {
15 15
16 class AccessibilityController; 16 class AccessibilityController;
17 class TestRunner; 17 class TestRunner;
18 class WebFrameTestProxyBase; 18 class WebFrameTestProxyBase;
19 class WebTestDelegate; 19 class WebTestDelegate;
20 class WebTestProxyBase; 20 class WebViewTestProxyBase;
21 21
22 // WebFrameTestClient implements WebFrameClient interface, providing behavior 22 // WebFrameTestClient implements WebFrameClient interface, providing behavior
23 // expected by tests. WebFrameTestClient ends up used by WebFrameTestProxy 23 // expected by tests. WebFrameTestClient ends up used by WebFrameTestProxy
24 // which coordinates forwarding WebFrameClient calls either to 24 // which coordinates forwarding WebFrameClient calls either to
25 // WebFrameTestClient or to the product code (i.e. to RenderFrameImpl). 25 // WebFrameTestClient or to the product code (i.e. to RenderFrameImpl).
26 class WebFrameTestClient : public blink::WebFrameClient { 26 class WebFrameTestClient : public blink::WebFrameClient {
27 public: 27 public:
28 // Caller has to ensure that all arguments (|test_runner|, |delegate| and so 28 // Caller has to ensure that all arguments (|test_runner|, |delegate| and so
29 // forth) live longer than |this|. 29 // forth) live longer than |this|.
30 WebFrameTestClient(TestRunner* test_runner, 30 WebFrameTestClient(TestRunner* test_runner,
31 WebTestDelegate* delegate, 31 WebTestDelegate* delegate,
32 WebTestProxyBase* web_test_proxy_base, 32 WebViewTestProxyBase* web_view_test_proxy_base,
33 WebFrameTestProxyBase* web_frame_test_proxy_base); 33 WebFrameTestProxyBase* web_frame_test_proxy_base);
34 34
35 ~WebFrameTestClient() override; 35 ~WebFrameTestClient() override;
36 36
37 // WebFrameClient overrides needed by WebFrameTestProxy. 37 // WebFrameClient overrides needed by WebFrameTestProxy.
38 blink::WebColorChooser* createColorChooser( 38 blink::WebColorChooser* createColorChooser(
39 blink::WebColorChooserClient* client, 39 blink::WebColorChooserClient* client,
40 const blink::WebColor& initial_color, 40 const blink::WebColor& initial_color,
41 const blink::WebVector<blink::WebColorSuggestion>& suggestions) override; 41 const blink::WebVector<blink::WebColorSuggestion>& suggestions) override;
42 void runModalAlertDialog(const blink::WebString& message) override; 42 void runModalAlertDialog(const blink::WebString& message) override;
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 const blink::WebSecurityOrigin& security_origin, 106 const blink::WebSecurityOrigin& security_origin,
107 blink::WebSetSinkIdCallbacks* web_callbacks) override; 107 blink::WebSetSinkIdCallbacks* web_callbacks) override;
108 void didClearWindowObject(blink::WebLocalFrame* frame) override; 108 void didClearWindowObject(blink::WebLocalFrame* frame) override;
109 bool runFileChooser(const blink::WebFileChooserParams& params, 109 bool runFileChooser(const blink::WebFileChooserParams& params,
110 blink::WebFileChooserCompletion* completion) override; 110 blink::WebFileChooserCompletion* completion) override;
111 111
112 private: 112 private:
113 // Borrowed pointers to other parts of Layout Tests state. 113 // Borrowed pointers to other parts of Layout Tests state.
114 TestRunner* test_runner_; 114 TestRunner* test_runner_;
115 WebTestDelegate* delegate_; 115 WebTestDelegate* delegate_;
116 WebTestProxyBase* web_test_proxy_base_; 116 WebViewTestProxyBase* web_view_test_proxy_base_;
117 WebFrameTestProxyBase* web_frame_test_proxy_base_; 117 WebFrameTestProxyBase* web_frame_test_proxy_base_;
118 118
119 // Map from request identifier into resource url description. The map is used 119 // Map from request identifier into resource url description. The map is used
120 // to track resource requests spanning willSendRequest, didReceiveResponse, 120 // to track resource requests spanning willSendRequest, didReceiveResponse,
121 // didChangeResourcePriority, didFinishResourceLoad. 121 // didChangeResourcePriority, didFinishResourceLoad.
122 std::map<unsigned, std::string> resource_identifier_map_; 122 std::map<unsigned, std::string> resource_identifier_map_;
123 123
124 DISALLOW_COPY_AND_ASSIGN(WebFrameTestClient); 124 DISALLOW_COPY_AND_ASSIGN(WebFrameTestClient);
125 }; 125 };
126 126
127 } // namespace test_runner 127 } // namespace test_runner
128 128
129 #endif // COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_CLIENT_H_ 129 #endif // COMPONENTS_TEST_RUNNER_WEB_FRAME_TEST_CLIENT_H_
OLDNEW
« no previous file with comments | « components/test_runner/text_input_controller.cc ('k') | components/test_runner/web_frame_test_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698