diff options
author | nhiroki <nhiroki@chromium.org> | 2014-09-14 18:49:39 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-09-15 01:51:50 +0000 |
commit | bedd69525d5dd70a953f7a8a49089de0d66fe148 (patch) | |
tree | 93798cbe0fdadaef1a16e19142a8c99109a09b80 /ui/views/touchui/touch_selection_controller_impl_unittest.cc | |
parent | a9e9f87c058a47db6c5709b38aae09acd56b11cc (diff) | |
download | chromium_src-bedd69525d5dd70a953f7a8a49089de0d66fe148.zip chromium_src-bedd69525d5dd70a953f7a8a49089de0d66fe148.tar.gz chromium_src-bedd69525d5dd70a953f7a8a49089de0d66fe148.tar.bz2 |
Revert of Clean up GestureEventDetails constructors (patchset #4 id:100001 of https://codereview.chromium.org/565583005/)
Reason for revert:
This seems to fail the following tests in "athena_unittests" on "Linux ChromiumOS Tests (dbg)(3)"
- HomeCardGestureManagerTest.Basic
- HomeCardGestureManagerTest.StartCentered
http://build.chromium.org/p/chromium.chromiumos/builders/Linux%20ChromiumOS%20Tests%20%28dbg%29%283%29/builds/36778
Original issue's description:
> Clean up GestureEventDetails' constructors.
>
> In one of the GestureEventDetails' constructors, the arguments
> delta_x, delta_y sometime are not used, so we should make a new
> constructor which only takes one argument EventType.
>
> BUG=350942
>
> Committed: https://crrev.com/b5e408e7bffd3d1e6b60612f65c0538a90329c59
> Cr-Commit-Position: refs/heads/master@{#294760}
TBR=tdresser@chromium.org,jdduke@chromium.org,sadrul@chromium.org,sky@chromium.org,lanwei@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=350942
Review URL: https://codereview.chromium.org/572593002
Cr-Commit-Position: refs/heads/master@{#294776}
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. |