summaryrefslogtreecommitdiffstats
path: root/ui/views/touchui/touch_selection_controller_impl_unittest.cc
diff options
context:
space:
mode:
authortdresser@chromium.org <tdresser@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-14 23:10:18 +0000
committertdresser@chromium.org <tdresser@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-14 23:10:18 +0000
commit62cf1d7bea18a0e37faaf3cea0159aa9af6f7df3 (patch)
tree4e098d0993ddad6771279980333d2711bc63fee5 /ui/views/touchui/touch_selection_controller_impl_unittest.cc
parent85c5dd305a8941e043a9fa4f48c5fb3eef98c759 (diff)
downloadchromium_src-62cf1d7bea18a0e37faaf3cea0159aa9af6f7df3.zip
chromium_src-62cf1d7bea18a0e37faaf3cea0159aa9af6f7df3.tar.gz
chromium_src-62cf1d7bea18a0e37faaf3cea0159aa9af6f7df3.tar.bz2
Replace touch_ids_bitfield_ with first_touch_id_.
touch_ids_bitfield was overcomplicated, and we never used anything except for the lowest touch id. BUG=366707 TEST=GestureRecognizerTest Review URL: https://codereview.chromium.org/344763003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@283070 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/views/touchui/touch_selection_controller_impl_unittest.cc')
-rw-r--r--ui/views/touchui/touch_selection_controller_impl_unittest.cc35
1 files changed, 25 insertions, 10 deletions
diff --git a/ui/views/touchui/touch_selection_controller_impl_unittest.cc b/ui/views/touchui/touch_selection_controller_impl_unittest.cc
index 8f21e37..0af64c3 100644
--- a/ui/views/touchui/touch_selection_controller_impl_unittest.cc
+++ b/ui/views/touchui/touch_selection_controller_impl_unittest.cc
@@ -252,8 +252,11 @@ TEST_F(TouchSelectionControllerImplTest, SelectionInTextfieldTest) {
CreateTextfield();
textfield_->SetText(ASCIIToUTF16("some text"));
// Tap the textfield to invoke touch selection.
- ui::GestureEvent tap(ui::ET_GESTURE_TAP, 0, 0, 0, base::TimeDelta(),
- ui::GestureEventDetails(ui::ET_GESTURE_TAP, 1.0f, 0.0f), 0);
+ ui::GestureEvent tap(0,
+ 0,
+ 0,
+ base::TimeDelta(),
+ ui::GestureEventDetails(ui::ET_GESTURE_TAP, 1.0f, 0.0f));
textfield_->OnGestureEvent(&tap);
// Test selecting a range.
@@ -284,8 +287,11 @@ TEST_F(TouchSelectionControllerImplTest, SelectionInBidiTextfieldTest) {
CreateTextfield();
textfield_->SetText(WideToUTF16(L"abc\x05d0\x05d1\x05d2"));
// Tap the textfield to invoke touch selection.
- ui::GestureEvent tap(ui::ET_GESTURE_TAP, 0, 0, 0, base::TimeDelta(),
- ui::GestureEventDetails(ui::ET_GESTURE_TAP, 1.0f, 0.0f), 0);
+ ui::GestureEvent tap(0,
+ 0,
+ 0,
+ base::TimeDelta(),
+ ui::GestureEventDetails(ui::ET_GESTURE_TAP, 1.0f, 0.0f));
textfield_->OnGestureEvent(&tap);
// Test cursor at run boundary and with empty selection.
@@ -332,8 +338,11 @@ TEST_F(TouchSelectionControllerImplTest, SelectRectCallbackTest) {
CreateTextfield();
textfield_->SetText(ASCIIToUTF16("textfield with selected text"));
// Tap the textfield to invoke touch selection.
- ui::GestureEvent tap(ui::ET_GESTURE_TAP, 0, 0, 0, base::TimeDelta(),
- ui::GestureEventDetails(ui::ET_GESTURE_TAP, 1.0f, 0.0f), 0);
+ ui::GestureEvent tap(0,
+ 0,
+ 0,
+ base::TimeDelta(),
+ ui::GestureEventDetails(ui::ET_GESTURE_TAP, 1.0f, 0.0f));
textfield_->OnGestureEvent(&tap);
textfield_->SelectRange(gfx::Range(3, 7));
@@ -370,8 +379,11 @@ TEST_F(TouchSelectionControllerImplTest, SelectRectInBidiCallbackTest) {
CreateTextfield();
textfield_->SetText(WideToUTF16(L"abc\x05e1\x05e2\x05e3" L"def"));
// Tap the textfield to invoke touch selection.
- ui::GestureEvent tap(ui::ET_GESTURE_TAP, 0, 0, 0, base::TimeDelta(),
- ui::GestureEventDetails(ui::ET_GESTURE_TAP, 1.0f, 0.0f), 0);
+ ui::GestureEvent tap(0,
+ 0,
+ 0,
+ base::TimeDelta(),
+ ui::GestureEventDetails(ui::ET_GESTURE_TAP, 1.0f, 0.0f));
textfield_->OnGestureEvent(&tap);
// Select [c] from left to right.
@@ -499,8 +511,11 @@ TEST_F(TouchSelectionControllerImplTest,
textfield_->SetText(ASCIIToUTF16(textfield_text));
// Tap the textfield to invoke selection.
- ui::GestureEvent tap(ui::ET_GESTURE_TAP, 0, 0, 0, base::TimeDelta(),
- ui::GestureEventDetails(ui::ET_GESTURE_TAP, 1.0f, 0.0f), 0);
+ ui::GestureEvent tap(0,
+ 0,
+ 0,
+ base::TimeDelta(),
+ ui::GestureEventDetails(ui::ET_GESTURE_TAP, 1.0f, 0.0f));
textfield_->OnGestureEvent(&tap);
// Select some text such that one handle is hidden.