diff options
author | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-20 21:41:07 +0000 |
---|---|---|
committer | dhollowa@chromium.org <dhollowa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-20 21:41:07 +0000 |
commit | f8d74230b839def072f26049845bd9003d87eb26 (patch) | |
tree | 7d5ecb668377162dab0260e7fe107018115b904e /ui/aura_shell | |
parent | 2212d27f2cc41983901f45299cda82d704c76e82 (diff) | |
download | chromium_src-f8d74230b839def072f26049845bd9003d87eb26.zip chromium_src-f8d74230b839def072f26049845bd9003d87eb26.tar.gz chromium_src-f8d74230b839def072f26049845bd9003d87eb26.tar.bz2 |
Rename ui::EventFlags mouse flags to be more sensible
Changes EF_(LEFT|MIDDLE|RIGHT)_BUTTON_DOWN to
EF_(LEF|MIDDLE|RIGHT)_MOUSE_BUTTON since these are not
specific to "down" button events.
This is follow up from review http://codereview.chromium.org/8953037
BUG=none
TEST=Compiles.
R=ben@chromium.org
Review URL: http://codereview.chromium.org/9007016
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115188 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/aura_shell')
-rw-r--r-- | ui/aura_shell/drag_drop_controller_unittest.cc | 41 | ||||
-rw-r--r-- | ui/aura_shell/root_window_event_filter_unittest.cc | 11 |
2 files changed, 33 insertions, 19 deletions
diff --git a/ui/aura_shell/drag_drop_controller_unittest.cc b/ui/aura_shell/drag_drop_controller_unittest.cc index fab1b590..7e55f97 100644 --- a/ui/aura_shell/drag_drop_controller_unittest.cc +++ b/ui/aura_shell/drag_drop_controller_unittest.cc @@ -206,7 +206,9 @@ TEST_F(DragDropControllerTest, DragDropInSingleViewTest) { ui::OSExchangeData data; data.SetString(UTF8ToUTF16("I am being dragged")); - aura::MouseEvent event1(ui::ET_MOUSE_PRESSED, point, ui::EF_LEFT_BUTTON_DOWN); + aura::MouseEvent event1(ui::ET_MOUSE_PRESSED, + point, + ui::EF_LEFT_MOUSE_BUTTON); aura::RootWindow::GetInstance()->DispatchMouseEvent(&event1); int num_drags = 17; @@ -218,8 +220,9 @@ TEST_F(DragDropControllerTest, DragDropInSingleViewTest) { if (i > 0) UpdateDragData(&data); point.Offset(0, 1); - aura::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, point, - ui::EF_LEFT_BUTTON_DOWN); + aura::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, + point, + ui::EF_LEFT_MOUSE_BUTTON); aura::RootWindow::GetInstance()->DispatchMouseEvent(&drag_event); } @@ -253,7 +256,9 @@ TEST_F(DragDropControllerTest, DragDropInMultipleViewsSingleWidgetTest) { ui::OSExchangeData data; data.SetString(UTF8ToUTF16("I am being dragged")); - aura::MouseEvent event1(ui::ET_MOUSE_PRESSED, point, ui::EF_LEFT_BUTTON_DOWN); + aura::MouseEvent event1(ui::ET_MOUSE_PRESSED, + point, + ui::EF_LEFT_MOUSE_BUTTON); aura::RootWindow::GetInstance()->DispatchMouseEvent(&event1); int num_drags = drag_view1->width(); @@ -265,8 +270,9 @@ TEST_F(DragDropControllerTest, DragDropInMultipleViewsSingleWidgetTest) { if (i > 0) UpdateDragData(&data); point.Offset(1, 0); - aura::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, point, - ui::EF_LEFT_BUTTON_DOWN); + aura::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, + point, + ui::EF_LEFT_MOUSE_BUTTON); aura::RootWindow::GetInstance()->DispatchMouseEvent(&drag_event); } @@ -314,7 +320,9 @@ TEST_F(DragDropControllerTest, DragDropInMultipleViewsMultipleWidgetsTest) { ui::OSExchangeData data; data.SetString(UTF8ToUTF16("I am being dragged")); - aura::MouseEvent event1(ui::ET_MOUSE_PRESSED, point, ui::EF_LEFT_BUTTON_DOWN); + aura::MouseEvent event1(ui::ET_MOUSE_PRESSED, + point, + ui::EF_LEFT_MOUSE_BUTTON); aura::RootWindow::GetInstance()->DispatchMouseEvent(&event1); int num_drags = drag_view1->width(); @@ -326,8 +334,9 @@ TEST_F(DragDropControllerTest, DragDropInMultipleViewsMultipleWidgetsTest) { if (i > 0) UpdateDragData(&data); point.Offset(1, 0); - aura::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, point, - ui::EF_LEFT_BUTTON_DOWN); + aura::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, + point, + ui::EF_LEFT_MOUSE_BUTTON); aura::RootWindow::GetInstance()->DispatchMouseEvent(&drag_event); } @@ -368,7 +377,9 @@ TEST_F(DragDropControllerTest, ViewRemovedWhileInDragDropTest) { ui::OSExchangeData data; data.SetString(UTF8ToUTF16("I am being dragged")); - aura::MouseEvent event1(ui::ET_MOUSE_PRESSED, point, ui::EF_LEFT_BUTTON_DOWN); + aura::MouseEvent event1(ui::ET_MOUSE_PRESSED, + point, + ui::EF_LEFT_MOUSE_BUTTON); aura::RootWindow::GetInstance()->DispatchMouseEvent(&event1); int num_drags_1 = 17; @@ -380,8 +391,9 @@ TEST_F(DragDropControllerTest, ViewRemovedWhileInDragDropTest) { if (i > 0) UpdateDragData(&data); point.Offset(0, 1); - aura::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, point, - ui::EF_LEFT_BUTTON_DOWN); + aura::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, + point, + ui::EF_LEFT_MOUSE_BUTTON); aura::RootWindow::GetInstance()->DispatchMouseEvent(&drag_event); } @@ -391,8 +403,9 @@ TEST_F(DragDropControllerTest, ViewRemovedWhileInDragDropTest) { for (int i = 0; i < num_drags_2; ++i) { UpdateDragData(&data); point.Offset(0, 1); - aura::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, point, - ui::EF_LEFT_BUTTON_DOWN); + aura::MouseEvent drag_event(ui::ET_MOUSE_DRAGGED, + point, + ui::EF_LEFT_MOUSE_BUTTON); aura::RootWindow::GetInstance()->DispatchMouseEvent(&drag_event); } diff --git a/ui/aura_shell/root_window_event_filter_unittest.cc b/ui/aura_shell/root_window_event_filter_unittest.cc index b8e1821..533867a 100644 --- a/ui/aura_shell/root_window_event_filter_unittest.cc +++ b/ui/aura_shell/root_window_event_filter_unittest.cc @@ -95,8 +95,9 @@ TEST_F(RootWindowEventFilterTest, Focus) { // Click on a sub-window (w121) to focus it. gfx::Point click_point = w121->bounds().CenterPoint(); aura::Window::ConvertPointToWindow(w121->parent(), root_window, &click_point); - aura::MouseEvent mouse(ui::ET_MOUSE_PRESSED, click_point, - ui::EF_LEFT_BUTTON_DOWN); + aura::MouseEvent mouse(ui::ET_MOUSE_PRESSED, + click_point, + ui::EF_LEFT_MOUSE_BUTTON); root_window->DispatchMouseEvent(&mouse); aura::internal::FocusManager* focus_manager = w121->GetFocusManager(); EXPECT_EQ(w121.get(), focus_manager->GetFocusedWindow()); @@ -358,19 +359,19 @@ TEST_F(RootWindowEventFilterTest, TransformActivate) { transform.TransformPoint(miss_point); aura::MouseEvent mouseev1(ui::ET_MOUSE_PRESSED, miss_point, - ui::EF_LEFT_BUTTON_DOWN); + ui::EF_LEFT_MOUSE_BUTTON); root_window->DispatchMouseEvent(&mouseev1); EXPECT_FALSE(w1->GetFocusManager()->GetFocusedWindow()); aura::MouseEvent mouseup(ui::ET_MOUSE_RELEASED, miss_point, - ui::EF_LEFT_BUTTON_DOWN); + ui::EF_LEFT_MOUSE_BUTTON); root_window->DispatchMouseEvent(&mouseup); gfx::Point hit_point(5, 15); transform.TransformPoint(hit_point); aura::MouseEvent mouseev2(ui::ET_MOUSE_PRESSED, hit_point, - ui::EF_LEFT_BUTTON_DOWN); + ui::EF_LEFT_MOUSE_BUTTON); root_window->DispatchMouseEvent(&mouseev2); EXPECT_TRUE(IsActiveWindow(w1.get())); EXPECT_EQ(w1.get(), w1->GetFocusManager()->GetFocusedWindow()); |