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

Side by Side Diff: ui/events/blink/input_handler_proxy_unittest.cc

Issue 1604053002: cc: Fix enum style conformance in InputHandler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: enumname: fixcasts Created 4 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
« no previous file with comments | « ui/events/blink/input_handler_proxy.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/events/blink/input_handler_proxy.h" 5 #include "ui/events/blink/input_handler_proxy.h"
6 6
7 #include "base/macros.h" 7 #include "base/macros.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/input/main_thread_scrolling_reason.h"
9 #include "cc/trees/swap_promise_monitor.h" 10 #include "cc/trees/swap_promise_monitor.h"
10 #include "testing/gmock/include/gmock/gmock.h" 11 #include "testing/gmock/include/gmock/gmock.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 #include "third_party/WebKit/public/platform/WebFloatPoint.h" 13 #include "third_party/WebKit/public/platform/WebFloatPoint.h"
13 #include "third_party/WebKit/public/platform/WebFloatSize.h" 14 #include "third_party/WebKit/public/platform/WebFloatSize.h"
14 #include "third_party/WebKit/public/platform/WebGestureCurve.h" 15 #include "third_party/WebKit/public/platform/WebGestureCurve.h"
15 #include "third_party/WebKit/public/platform/WebPoint.h" 16 #include "third_party/WebKit/public/platform/WebPoint.h"
16 #include "third_party/WebKit/public/web/WebInputEvent.h" 17 #include "third_party/WebKit/public/web/WebInputEvent.h"
17 #include "ui/events/blink/input_handler_proxy_client.h" 18 #include "ui/events/blink/input_handler_proxy_client.h"
18 #include "ui/events/latency_info.h" 19 #include "ui/events/latency_info.h"
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 float y) { 238 float y) {
238 WebTouchPoint point; 239 WebTouchPoint point;
239 point.state = state; 240 point.state = state;
240 point.screenPosition = WebFloatPoint(x, y); 241 point.screenPosition = WebFloatPoint(x, y);
241 point.position = WebFloatPoint(x, y); 242 point.position = WebFloatPoint(x, y);
242 return point; 243 return point;
243 } 244 }
244 245
245 const cc::InputHandler::ScrollStatus kImplThreadScrollState( 246 const cc::InputHandler::ScrollStatus kImplThreadScrollState(
246 cc::InputHandler::SCROLL_ON_IMPL_THREAD, 247 cc::InputHandler::SCROLL_ON_IMPL_THREAD,
247 cc::InputHandler::NOT_SCROLLING_ON_MAIN); 248 cc::MainThreadScrollingReason::kNotScrollingOnMain);
248 249
249 const cc::InputHandler::ScrollStatus kMainThreadScrollState( 250 const cc::InputHandler::ScrollStatus kMainThreadScrollState(
250 cc::InputHandler::SCROLL_ON_MAIN_THREAD, 251 cc::InputHandler::SCROLL_ON_MAIN_THREAD,
251 cc::InputHandler::EVENT_HANDLERS); 252 cc::MainThreadScrollingReason::kEventHandlers);
252 253
253 const cc::InputHandler::ScrollStatus kScrollIgnoredScrollState( 254 const cc::InputHandler::ScrollStatus kScrollIgnoredScrollState(
254 cc::InputHandler::SCROLL_IGNORED, 255 cc::InputHandler::SCROLL_IGNORED,
255 cc::InputHandler::NOT_SCROLLABLE); 256 cc::MainThreadScrollingReason::kNotScrollable);
256 257
257 } // namespace 258 } // namespace
258 259
259 class InputHandlerProxyTest 260 class InputHandlerProxyTest
260 : public testing::Test, 261 : public testing::Test,
261 public testing::WithParamInterface<InputHandlerProxyTestType> { 262 public testing::WithParamInterface<InputHandlerProxyTestType> {
262 public: 263 public:
263 InputHandlerProxyTest() 264 InputHandlerProxyTest()
264 : synchronous_root_scroll_(GetParam() == ROOT_SCROLL_SYNCHRONOUS_HANDLER), 265 : synchronous_root_scroll_(GetParam() == ROOT_SCROLL_SYNCHRONOUS_HANDLER),
265 install_synchronous_handler_( 266 install_synchronous_handler_(
(...skipping 2258 matching lines...) Expand 10 before | Expand all | Expand 10 after
2524 testing::Mock::VerifyAndClearExpectations(&mock_input_handler); 2525 testing::Mock::VerifyAndClearExpectations(&mock_input_handler);
2525 testing::Mock::VerifyAndClearExpectations(&mock_client); 2526 testing::Mock::VerifyAndClearExpectations(&mock_client);
2526 testing::Mock::VerifyAndClearExpectations(&mock_synchronous_input_handler); 2527 testing::Mock::VerifyAndClearExpectations(&mock_synchronous_input_handler);
2527 } 2528 }
2528 2529
2529 INSTANTIATE_TEST_CASE_P(AnimateInput, 2530 INSTANTIATE_TEST_CASE_P(AnimateInput,
2530 InputHandlerProxyTest, 2531 InputHandlerProxyTest,
2531 testing::ValuesIn(test_types)); 2532 testing::ValuesIn(test_types));
2532 } // namespace test 2533 } // namespace test
2533 } // namespace ui 2534 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/blink/input_handler_proxy.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698