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

Side by Side Diff: content/browser/renderer_host/input/touch_selection_controller_unittest.cc

Issue 502993004: Remove abstract Clone and Cancel methods from MotionEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nasty bug fix Created 6 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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/browser/renderer_host/input/touch_selection_controller.h" 5 #include "content/browser/renderer_host/input/touch_selection_controller.h"
6 6
7 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
8 #include "ui/events/test/mock_motion_event.h" 8 #include "ui/events/test/motion_event_test_utils.h"
9 9
10 using ui::test::MockMotionEvent; 10 using ui::test::MockMotionEvent;
11 11
12 namespace content { 12 namespace content {
13 namespace { 13 namespace {
14 14
15 const int kDefaultTapTimeoutMs = 200; 15 const int kDefaultTapTimeoutMs = 200;
16 const float kDefaulTapSlop = 10.f; 16 const float kDefaulTapSlop = 10.f;
17 17
18 class MockTouchHandleDrawable : public TouchHandleDrawable { 18 class MockTouchHandleDrawable : public TouchHandleDrawable {
(...skipping 651 matching lines...) Expand 10 before | Expand all | Expand 10 after
670 EXPECT_EQ(SELECTION_SHOWN, GetLastEventType()); 670 EXPECT_EQ(SELECTION_SHOWN, GetLastEventType());
671 EXPECT_EQ(start_rect.bottom_left(), GetLastEventAnchor()); 671 EXPECT_EQ(start_rect.bottom_left(), GetLastEventAnchor());
672 672
673 controller().OnTapEvent(); 673 controller().OnTapEvent();
674 ClearSelection(); 674 ClearSelection();
675 EXPECT_EQ(SELECTION_CLEARED, GetLastEventType()); 675 EXPECT_EQ(SELECTION_CLEARED, GetLastEventType());
676 EXPECT_EQ(gfx::PointF(), GetLastEventAnchor()); 676 EXPECT_EQ(gfx::PointF(), GetLastEventAnchor());
677 } 677 }
678 678
679 } // namespace content 679 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698