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

Side by Side Diff: ui/touch_selection/touch_selection_controller_unittest.cc

Issue 819943002: Standardize usage of virtual/override/final specifiers in ui/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 12 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/gl/gl_image_glx.h ('k') | ui/views/controls/scrollbar/base_scroll_bar.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ui/touch_selection/touch_selection_controller.h" 5 #include "ui/touch_selection/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/motion_event_test_utils.h" 8 #include "ui/events/test/motion_event_test_utils.h"
9 9
10 using ui::test::MockMotionEvent; 10 using ui::test::MockMotionEvent;
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 void SelectBetweenCoordinates(const gfx::PointF& base, 73 void SelectBetweenCoordinates(const gfx::PointF& base,
74 const gfx::PointF& extent) override { 74 const gfx::PointF& extent) override {
75 if (base == selection_end_ && extent == selection_start_) 75 if (base == selection_end_ && extent == selection_start_)
76 selection_points_swapped_ = true; 76 selection_points_swapped_ = true;
77 77
78 selection_start_ = base; 78 selection_start_ = base;
79 selection_end_ = extent; 79 selection_end_ = extent;
80 } 80 }
81 81
82 virtual void MoveRangeSelectionExtent(const gfx::PointF& extent) override { 82 void MoveRangeSelectionExtent(const gfx::PointF& extent) override {
83 selection_moved_ = true; 83 selection_moved_ = true;
84 selection_end_ = extent; 84 selection_end_ = extent;
85 } 85 }
86 86
87 void OnSelectionEvent(SelectionEventType event, 87 void OnSelectionEvent(SelectionEventType event,
88 const gfx::PointF& end_position) override { 88 const gfx::PointF& end_position) override {
89 last_event_ = event; 89 last_event_ = event;
90 last_event_start_ = end_position; 90 last_event_start_ = end_position;
91 } 91 }
92 92
(...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 controller().OnSelectionEmpty(false); 834 controller().OnSelectionEmpty(false);
835 controller().HideAndDisallowShowingAutomatically(); 835 controller().HideAndDisallowShowingAutomatically();
836 gfx::RectF insertion_rect(5, 5, 0, 10); 836 gfx::RectF insertion_rect(5, 5, 0, 10);
837 ChangeInsertion(insertion_rect, visible); 837 ChangeInsertion(insertion_rect, visible);
838 controller().AllowShowingFromCurrentSelection(); 838 controller().AllowShowingFromCurrentSelection();
839 EXPECT_EQ(INSERTION_SHOWN, GetLastEventType()); 839 EXPECT_EQ(INSERTION_SHOWN, GetLastEventType());
840 EXPECT_EQ(insertion_rect.bottom_left(), GetLastEventAnchor()); 840 EXPECT_EQ(insertion_rect.bottom_left(), GetLastEventAnchor());
841 } 841 }
842 842
843 } // namespace ui 843 } // namespace ui
OLDNEW
« no previous file with comments | « ui/gl/gl_image_glx.h ('k') | ui/views/controls/scrollbar/base_scroll_bar.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698