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

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

Issue 1897363003: Use correct WebView from EventSender. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed initial state of EventSender. 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
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_VIEW_TEST_CLIENT_H_ 5 #ifndef COMPONENTS_TEST_RUNNER_WEB_VIEW_TEST_CLIENT_H_
6 #define COMPONENTS_TEST_RUNNER_WEB_VIEW_TEST_CLIENT_H_ 6 #define COMPONENTS_TEST_RUNNER_WEB_VIEW_TEST_CLIENT_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/weak_ptr.h" 9 #include "base/memory/weak_ptr.h"
10 #include "third_party/WebKit/public/web/WebViewClient.h" 10 #include "third_party/WebKit/public/web/WebViewClient.h"
(...skipping 11 matching lines...) Expand all
22 22
23 // WebViewTestClient implements WebViewClient interface, providing behavior 23 // WebViewTestClient implements WebViewClient interface, providing behavior
24 // expected by tests. WebViewTestClient ends up used by WebTestProxy 24 // expected by tests. WebViewTestClient ends up used by WebTestProxy
25 // which coordinates forwarding WebViewClient calls either to 25 // which coordinates forwarding WebViewClient calls either to
26 // WebViewTestClient or to the product code (i.e. to RenderViewImpl). 26 // WebViewTestClient or to the product code (i.e. to RenderViewImpl).
27 class WebViewTestClient : public blink::WebViewClient { 27 class WebViewTestClient : public blink::WebViewClient {
28 public: 28 public:
29 // Caller has to ensure that all arguments (i.e. |test_runner| and |delegate|) 29 // Caller has to ensure that all arguments (i.e. |test_runner| and |delegate|)
30 // live longer than |this|. 30 // live longer than |this|.
31 WebViewTestClient(TestRunner* test_runner, 31 WebViewTestClient(TestRunner* test_runner,
32 EventSender* event_sender,
33 WebTestProxyBase* web_test_proxy_base); 32 WebTestProxyBase* web_test_proxy_base);
34 33
35 virtual ~WebViewTestClient(); 34 virtual ~WebViewTestClient();
36 35
37 // WebViewClient overrides needed by WebTestProxy. 36 // WebViewClient overrides needed by WebTestProxy.
38 void showValidationMessage(const blink::WebRect& anchor_in_root_view, 37 void showValidationMessage(const blink::WebRect& anchor_in_root_view,
39 const blink::WebString& main_message, 38 const blink::WebString& main_message,
40 blink::WebTextDirection main_message_hint, 39 blink::WebTextDirection main_message_hint,
41 const blink::WebString& sub_message, 40 const blink::WebString& sub_message,
42 blink::WebTextDirection sub_message_hint) override; 41 blink::WebTextDirection sub_message_hint) override;
(...skipping 23 matching lines...) Expand all
66 blink::WebTextDirection direction) override; 65 blink::WebTextDirection direction) override;
67 void resetInputMethod() override; 66 void resetInputMethod() override;
68 blink::WebString acceptLanguages() override; 67 blink::WebString acceptLanguages() override;
69 68
70 private: 69 private:
71 void AnimateNow(); 70 void AnimateNow();
72 WebTestDelegate* delegate(); 71 WebTestDelegate* delegate();
73 72
74 // Borrowed pointers to other parts of Layout Tests state. 73 // Borrowed pointers to other parts of Layout Tests state.
75 TestRunner* test_runner_; 74 TestRunner* test_runner_;
76 EventSender* event_sender_;
77 WebTestProxyBase* web_test_proxy_base_; 75 WebTestProxyBase* web_test_proxy_base_;
78 76
79 bool animation_scheduled_; 77 bool animation_scheduled_;
80 78
81 base::WeakPtrFactory<WebViewTestClient> weak_factory_; 79 base::WeakPtrFactory<WebViewTestClient> weak_factory_;
82 80
83 DISALLOW_COPY_AND_ASSIGN(WebViewTestClient); 81 DISALLOW_COPY_AND_ASSIGN(WebViewTestClient);
84 }; 82 };
85 83
86 } // namespace test_runner 84 } // namespace test_runner
87 85
88 #endif // COMPONENTS_TEST_RUNNER_WEB_VIEW_TEST_CLIENT_H_ 86 #endif // COMPONENTS_TEST_RUNNER_WEB_VIEW_TEST_CLIENT_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698