diff options
author | horo <horo@chromium.org> | 2014-09-16 20:49:20 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-17 03:49:31 +0000 |
commit | f0003ece045e6e30ff3d70be4ea818c365b08cf6 (patch) | |
tree | 400db20744e6a5eb06c3feae74e6211606e00170 /ui/views/touchui/touch_selection_controller_impl_unittest.cc | |
parent | 366f7a7500ef5951b17bb8aeb087fcd90559e347 (diff) | |
download | chromium_src-f0003ece045e6e30ff3d70be4ea818c365b08cf6.zip chromium_src-f0003ece045e6e30ff3d70be4ea818c365b08cf6.tar.gz chromium_src-f0003ece045e6e30ff3d70be4ea818c365b08cf6.tar.bz2 |
Revert of Clean up GestureEventDetails constructors and fix unit tests (patchset #1 id:20001 of https://codereview.chromium.org/573963005/)
Reason for revert:
This broke TouchEditableImplAuraTest.TouchSelectionOnLongPressTest.
[24874:24874:0916/151803:584385367:FATAL:gesture_event_details.cc(54)] Check failed: false. Invalid event type for constructor: 32
http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=undefined&tests=TouchEditableImplAuraTest.TouchSelectionOnLongPressTest&testType=content_browsertests
http://test-results.appspot.com/dashboards/flakiness_dashboard.html#group=undefined&tests=TouchEditableImplAuraTest.TouchSelectionOnLongPressTest&testType=content_browsertests
Original issue's description:
> Clean up GestureEventDetails constructors and fix unit tests.
>
> A new version of Issue 565583005: Clean up GestureEventDetails
> constructors
> https://codereview.chromium.org/565583005/
>
> BUG=350942
>
> TBR=tdresser@chromium.org, jdduke@chromium.org, sadrul@chromium.org
>
> Committed: https://crrev.com/874611d5ab5b879648682c1ea41062bebc9c95e5
> Cr-Commit-Position: refs/heads/master@{#295144}
TBR=sky@chromium.org,lanwei@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=350942
Review URL: https://codereview.chromium.org/577833003
Cr-Commit-Position: refs/heads/master@{#295223}
Diffstat (limited to 'ui/views/touchui/touch_selection_controller_impl_unittest.cc')
-rw-r--r-- | ui/views/touchui/touch_selection_controller_impl_unittest.cc | 40 |
1 files changed, 25 insertions, 15 deletions
diff --git a/ui/views/touchui/touch_selection_controller_impl_unittest.cc b/ui/views/touchui/touch_selection_controller_impl_unittest.cc index b268d2c..acd62ff 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 @@ TEST_F(TouchSelectionControllerImplTest, SelectionInTextfieldTest) { 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 @@ TEST_F(TouchSelectionControllerImplTest, SelectionInBidiTextfieldTest) { 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 @@ TEST_F(TouchSelectionControllerImplTest, SelectRectCallbackTest) { 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 @@ TEST_F(TouchSelectionControllerImplTest, SelectRectInBidiCallbackTest) { 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 @@ TEST_F(TouchSelectionControllerImplTest, 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. |