summaryrefslogtreecommitdiffstats
path: root/ui/views/touchui/touch_selection_controller_impl_unittest.cc
diff options
context:
space:
mode:
authorrobert.bradford <robert.bradford@intel.com>2015-02-18 10:56:10 -0800
committerCommit bot <commit-bot@chromium.org>2015-02-18 18:57:07 +0000
commitb3d800b765279e004158f880b097817c81576d84 (patch)
tree2441f7e4c7318c229d4336cdb51225eb9ca74122 /ui/views/touchui/touch_selection_controller_impl_unittest.cc
parent7e58ae8fc348c29e5ea76cae07e09f8783d6e040 (diff)
downloadchromium_src-b3d800b765279e004158f880b097817c81576d84.zip
chromium_src-b3d800b765279e004158f880b097817c81576d84.tar.gz
chromium_src-b3d800b765279e004158f880b097817c81576d84.tar.bz2
Add time_stamp parameter to MouseEvent constructor
In order to allow the use of accurate kernel timestamps in the events from Ozone it is necessary to add a parameter to the constructor for MouseEvent. This CL was partially generated from using a clang tool with some manual changes for files not included in my build and to add header files as necessary. This change fills in all users of the newly added time_stamp parameter with a call into ui::EventTimeForNow() which was the original behaviour used by the constructor. BUG=450341 TEST=Build on all try bots and all unit tests pass. Review URL: https://codereview.chromium.org/934653002 Cr-Commit-Position: refs/heads/master@{#316869}
Diffstat (limited to 'ui/views/touchui/touch_selection_controller_impl_unittest.cc')
-rw-r--r--ui/views/touchui/touch_selection_controller_impl_unittest.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/views/touchui/touch_selection_controller_impl_unittest.cc b/ui/views/touchui/touch_selection_controller_impl_unittest.cc
index 1e2254a..3c9a9cc 100644
--- a/ui/views/touchui/touch_selection_controller_impl_unittest.cc
+++ b/ui/views/touchui/touch_selection_controller_impl_unittest.cc
@@ -10,6 +10,7 @@
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/touch/touch_editing_controller.h"
#include "ui/base/ui_base_switches.h"
+#include "ui/events/event_utils.h"
#include "ui/events/test/event_generator.h"
#include "ui/gfx/canvas.h"
#include "ui/gfx/geometry/point.h"
@@ -736,7 +737,7 @@ TEST_F(TouchSelectionControllerImplTest, HandlesStackAboveParent) {
StartTouchEditing();
gfx::Point test_point = GetCursorHandleDragPoint();
ui::MouseEvent test_event1(ui::ET_MOUSE_MOVED, test_point, test_point,
- ui::EF_NONE, ui::EF_NONE);
+ ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE);
EXPECT_EQ(GetCursorHandleNativeView(),
targeter->FindTargetForEvent(root, &test_event1));
EndTouchEditing();
@@ -749,14 +750,14 @@ TEST_F(TouchSelectionControllerImplTest, HandlesStackAboveParent) {
// above the second window.
StartTouchEditing();
ui::MouseEvent test_event2(ui::ET_MOUSE_MOVED, test_point, test_point,
- ui::EF_NONE, ui::EF_NONE);
+ ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE);
EXPECT_EQ(window2, targeter->FindTargetForEvent(root, &test_event2));
// Move the first window to top and check that the handle is kept above the
// first window.
window1->GetRootWindow()->StackChildAtTop(window1);
ui::MouseEvent test_event3(ui::ET_MOUSE_MOVED, test_point, test_point,
- ui::EF_NONE, ui::EF_NONE);
+ ui::EventTimeForNow(), ui::EF_NONE, ui::EF_NONE);
EXPECT_EQ(GetCursorHandleNativeView(),
targeter->FindTargetForEvent(root, &test_event3));
}