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

Side by Side Diff: content/browser/renderer_host/render_widget_host_unittest.cc

Issue 131373004: Let the browser know the end of fling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 11 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 (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 "base/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/bind.h" 6 #include "base/bind.h"
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "base/memory/shared_memory.h" 8 #include "base/memory/shared_memory.h"
9 #include "base/timer/timer.h" 9 #include "base/timer/timer.h"
10 #include "content/browser/browser_thread_impl.h" 10 #include "content/browser/browser_thread_impl.h"
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 send_touch_event_not_cancelled_ = 160 send_touch_event_not_cancelled_ =
161 client_->FilterInputEvent(touch_event.event, touch_event.latency) == 161 client_->FilterInputEvent(touch_event.event, touch_event.latency) ==
162 INPUT_EVENT_ACK_STATE_NOT_CONSUMED; 162 INPUT_EVENT_ACK_STATE_NOT_CONSUMED;
163 } 163 }
164 virtual const NativeWebKeyboardEvent* GetLastKeyboardEvent() const OVERRIDE { 164 virtual const NativeWebKeyboardEvent* GetLastKeyboardEvent() const OVERRIDE {
165 NOTREACHED(); 165 NOTREACHED();
166 return NULL; 166 return NULL;
167 } 167 }
168 virtual bool ShouldForwardTouchEvent() const OVERRIDE { return true; } 168 virtual bool ShouldForwardTouchEvent() const OVERRIDE { return true; }
169 virtual void OnViewUpdated(int view_flags) OVERRIDE {} 169 virtual void OnViewUpdated(int view_flags) OVERRIDE {}
170 virtual void DidStopFlinging() OVERRIDE {}
170 171
171 // IPC::Listener 172 // IPC::Listener
172 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE { 173 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE {
173 message_received_ = true; 174 message_received_ = true;
174 return false; 175 return false;
175 } 176 }
176 177
177 bool flush_called_; 178 bool flush_called_;
178 bool send_event_called_; 179 bool send_event_called_;
179 bool sent_mouse_event_; 180 bool sent_mouse_event_;
(...skipping 2318 matching lines...) Expand 10 before | Expand all | Expand 10 after
2498 2499
2499 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) { 2500 TEST_F(RenderWidgetHostTest, InputRouterReceivesHasTouchEventHandlers) {
2500 host_->SetupForInputRouterTest(); 2501 host_->SetupForInputRouterTest();
2501 2502
2502 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true)); 2503 host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, true));
2503 2504
2504 EXPECT_TRUE(host_->mock_input_router()->message_received_); 2505 EXPECT_TRUE(host_->mock_input_router()->message_received_);
2505 } 2506 }
2506 2507
2507 } // namespace content 2508 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698