diff options
author | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-26 01:39:49 +0000 |
---|---|---|
committer | oshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-26 01:39:49 +0000 |
commit | 68a8e06e889030ab860eb3c8040d9812d4b2b8fa (patch) | |
tree | 60717f024907613aeb469f16900c2e371d8ca69a /ui/aura/event_unittest.cc | |
parent | fb0f86daed8fed754c67e8fb4828c4c89061ef1d (diff) | |
download | chromium_src-68a8e06e889030ab860eb3c8040d9812d4b2b8fa.zip chromium_src-68a8e06e889030ab860eb3c8040d9812d4b2b8fa.tar.gz chromium_src-68a8e06e889030ab860eb3c8040d9812d4b2b8fa.tar.bz2 |
Use translated root location in WebInputEvent
This adds root_location to LocatedEvent
Converted a couple of tests to use EventGenerator.
BUG=none
TEST=added TranslatedEvent test to window_unittests.
Review URL: http://codereview.chromium.org/9117018
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@119169 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura/event_unittest.cc')
-rw-r--r-- | ui/aura/event_unittest.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/ui/aura/event_unittest.cc b/ui/aura/event_unittest.cc index 8b6b07c..5579031 100644 --- a/ui/aura/event_unittest.cc +++ b/ui/aura/event_unittest.cc @@ -71,7 +71,8 @@ TEST(EventTest, GetCharacter) { } TEST(EventTest, ClickCount) { - MouseEvent mouseev(ui::ET_MOUSE_PRESSED, gfx::Point(0, 0), 0); + const gfx::Point origin(0, 0); + MouseEvent mouseev(ui::ET_MOUSE_PRESSED, origin, origin, 0); for (int i = 1; i <=3 ; ++i) { mouseev.SetClickCount(i); EXPECT_EQ(i, mouseev.GetClickCount()); @@ -79,8 +80,9 @@ TEST(EventTest, ClickCount) { } TEST(EventTest, Repeated) { - MouseEvent mouse_ev1(ui::ET_MOUSE_PRESSED, gfx::Point(0, 0), 0); - MouseEvent mouse_ev2(ui::ET_MOUSE_PRESSED, gfx::Point(0, 0), 0); + const gfx::Point origin(0, 0); + MouseEvent mouse_ev1(ui::ET_MOUSE_PRESSED, origin, origin, 0); + MouseEvent mouse_ev2(ui::ET_MOUSE_PRESSED, origin, origin, 0); MouseEvent::TestApi test_ev1(&mouse_ev1); MouseEvent::TestApi test_ev2(&mouse_ev2); |