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

Side by Side Diff: content/renderer/input/input_handler_proxy_unittest.cc

Issue 1403893003: Plumb gesture source value through Blink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Convert more tests (related to CL) to use Touchscreen. Created 5 years, 2 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/renderer/input/input_handler_proxy.h" 5 #include "content/renderer/input/input_handler_proxy.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/trees/swap_promise_monitor.h" 9 #include "cc/trees/swap_promise_monitor.h"
10 #include "content/common/input/did_overscroll_params.h" 10 #include "content/common/input/did_overscroll_params.h"
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 254
255 if (install_synchronous_handler_) { 255 if (install_synchronous_handler_) {
256 EXPECT_CALL(mock_input_handler_, 256 EXPECT_CALL(mock_input_handler_,
257 RequestUpdateForSynchronousInputHandler()) 257 RequestUpdateForSynchronousInputHandler())
258 .Times(1); 258 .Times(1);
259 input_handler_->SetOnlySynchronouslyAnimateRootFlings( 259 input_handler_->SetOnlySynchronouslyAnimateRootFlings(
260 &mock_synchronous_input_handler_); 260 &mock_synchronous_input_handler_);
261 } 261 }
262 262
263 mock_input_handler_.set_is_scrolling_root(synchronous_root_scroll_); 263 mock_input_handler_.set_is_scrolling_root(synchronous_root_scroll_);
264
265 // Set a default device so tests don't always have to set this.
266 gesture_.sourceDevice = blink::WebGestureDeviceTouchpad;
264 } 267 }
265 268
266 ~InputHandlerProxyTest() { 269 ~InputHandlerProxyTest() {
267 input_handler_.reset(); 270 input_handler_.reset();
268 } 271 }
269 272
270 // This is defined as a macro so the line numbers can be traced back to the 273 // This is defined as a macro so the line numbers can be traced back to the
271 // correct spot when it fails. 274 // correct spot when it fails.
272 #define EXPECT_SET_NEEDS_ANIMATE_INPUT(times) \ 275 #define EXPECT_SET_NEEDS_ANIMATE_INPUT(times) \
273 do { \ 276 do { \
(...skipping 2142 matching lines...) Expand 10 before | Expand all | Expand 10 after
2416 testing::Mock::VerifyAndClearExpectations(&mock_client); 2419 testing::Mock::VerifyAndClearExpectations(&mock_client);
2417 testing::Mock::VerifyAndClearExpectations(&mock_synchronous_input_handler); 2420 testing::Mock::VerifyAndClearExpectations(&mock_synchronous_input_handler);
2418 } 2421 }
2419 2422
2420 INSTANTIATE_TEST_CASE_P(AnimateInput, 2423 INSTANTIATE_TEST_CASE_P(AnimateInput,
2421 InputHandlerProxyTest, 2424 InputHandlerProxyTest,
2422 testing::ValuesIn(test_types)); 2425 testing::ValuesIn(test_types));
2423 2426
2424 } // namespace 2427 } // namespace
2425 } // namespace content 2428 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/input/input_handler_proxy.cc ('k') | third_party/WebKit/Source/core/events/GestureEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698