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

Unified Diff: ui/views/touchui/touch_selection_controller_impl_unittest.cc

Issue 572593002: Revert of Clean up GestureEventDetails constructors (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/corewm/desktop_capture_controller_unittest.cc ('k') | ui/views/view_targeter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/touchui/touch_selection_controller_impl_unittest.cc
diff --git a/ui/views/touchui/touch_selection_controller_impl_unittest.cc b/ui/views/touchui/touch_selection_controller_impl_unittest.cc
index b268d2c76e648426f5c98adbabe9e271198b5a38..acd62ffca03c6699e83ab1578900200236090d73 100644
--- a/ui/views/touchui/touch_selection_controller_impl_unittest.cc
+++ b/ui/views/touchui/touch_selection_controller_impl_unittest.cc
@@ -252,9 +252,11 @@
CreateTextfield();
textfield_->SetText(ASCIIToUTF16("some text"));
// Tap the textfield to invoke touch selection.
- ui::GestureEventDetails details(ui::ET_GESTURE_TAP);
- details.set_tap_count(1);
- ui::GestureEvent tap(0, 0, 0, base::TimeDelta(), details);
+ 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.
@@ -285,9 +287,11 @@
CreateTextfield();
textfield_->SetText(WideToUTF16(L"abc\x05d0\x05d1\x05d2"));
// Tap the textfield to invoke touch selection.
- ui::GestureEventDetails details(ui::ET_GESTURE_TAP);
- details.set_tap_count(1);
- ui::GestureEvent tap(0, 0, 0, base::TimeDelta(), details);
+ 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.
@@ -334,9 +338,11 @@
CreateTextfield();
textfield_->SetText(ASCIIToUTF16("textfield with selected text"));
// Tap the textfield to invoke touch selection.
- ui::GestureEventDetails details(ui::ET_GESTURE_TAP);
- details.set_tap_count(1);
- ui::GestureEvent tap(0, 0, 0, base::TimeDelta(), details);
+ 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));
@@ -373,9 +379,11 @@
CreateTextfield();
textfield_->SetText(WideToUTF16(L"abc\x05e1\x05e2\x05e3" L"def"));
// Tap the textfield to invoke touch selection.
- ui::GestureEventDetails details(ui::ET_GESTURE_TAP);
- details.set_tap_count(1);
- ui::GestureEvent tap(0, 0, 0, base::TimeDelta(), details);
+ 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.
@@ -503,9 +511,11 @@
textfield_->SetText(ASCIIToUTF16(textfield_text));
// Tap the textfield to invoke selection.
- ui::GestureEventDetails details(ui::ET_GESTURE_TAP);
- details.set_tap_count(1);
- ui::GestureEvent tap(0, 0, 0, base::TimeDelta(), details);
+ 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.
« no previous file with comments | « ui/views/corewm/desktop_capture_controller_unittest.cc ('k') | ui/views/view_targeter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698