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

Side by Side Diff: content/public/test/test_renderer_host.cc

Issue 660663002: Clear pending events upon main frame navigation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updates Created 6 years, 1 month 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "content/public/test/test_renderer_host.h" 5 #include "content/public/test/test_renderer_host.h"
6 6
7 #include "base/run_loop.h" 7 #include "base/run_loop.h"
8 #include "content/browser/frame_host/navigation_entry_impl.h" 8 #include "content/browser/frame_host/navigation_entry_impl.h"
9 #include "content/browser/renderer_host/render_view_host_factory.h" 9 #include "content/browser/renderer_host/render_view_host_factory.h"
10 #include "content/browser/renderer_host/render_widget_host_impl.h" 10 #include "content/browser/renderer_host/render_widget_host_impl.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 return static_cast<TestRenderViewHost*>(host); 58 return static_cast<TestRenderViewHost*>(host);
59 } 59 }
60 60
61 // static 61 // static
62 bool RenderViewHostTester::TestOnMessageReceived(RenderViewHost* rvh, 62 bool RenderViewHostTester::TestOnMessageReceived(RenderViewHost* rvh,
63 const IPC::Message& msg) { 63 const IPC::Message& msg) {
64 return static_cast<RenderViewHostImpl*>(rvh)->OnMessageReceived(msg); 64 return static_cast<RenderViewHostImpl*>(rvh)->OnMessageReceived(msg);
65 } 65 }
66 66
67 // static 67 // static
68 bool RenderViewHostTester::HasTouchEventHandler(RenderViewHost* rvh) { 68 bool RenderViewHostTester::WillForwardTouchEvents(RenderViewHost* rvh) {
69 RenderWidgetHostImpl* host_impl = RenderWidgetHostImpl::From(rvh); 69 RenderWidgetHostImpl* host_impl = RenderWidgetHostImpl::From(rvh);
70 return host_impl->has_touch_handler(); 70 return host_impl->ShouldForwardTouchEvent();
71 } 71 }
72 72
73 73
74 // RenderViewHostTestEnabler -------------------------------------------------- 74 // RenderViewHostTestEnabler --------------------------------------------------
75 75
76 RenderViewHostTestEnabler::RenderViewHostTestEnabler() 76 RenderViewHostTestEnabler::RenderViewHostTestEnabler()
77 : rph_factory_(new MockRenderProcessHostFactory()), 77 : rph_factory_(new MockRenderProcessHostFactory()),
78 rvh_factory_(new TestRenderViewHostFactory(rph_factory_.get())), 78 rvh_factory_(new TestRenderViewHostFactory(rph_factory_.get())),
79 rfh_factory_(new TestRenderFrameHostFactory()) {} 79 rfh_factory_(new TestRenderFrameHostFactory()) {}
80 80
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() { 226 BrowserContext* RenderViewHostTestHarness::CreateBrowserContext() {
227 return new TestBrowserContext(); 227 return new TestBrowserContext();
228 } 228 }
229 229
230 void RenderViewHostTestHarness::SetRenderProcessHostFactory( 230 void RenderViewHostTestHarness::SetRenderProcessHostFactory(
231 RenderProcessHostFactory* factory) { 231 RenderProcessHostFactory* factory) {
232 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory); 232 rvh_test_enabler_.rvh_factory_->set_render_process_host_factory(factory);
233 } 233 }
234 234
235 } // namespace content 235 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/test_renderer_host.h ('k') | ui/events/gesture_detection/filtered_gesture_provider.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698