| Index: ui/views/controls/table/table_view_unittest.cc
|
| diff --git a/ui/views/controls/table/table_view_unittest.cc b/ui/views/controls/table/table_view_unittest.cc
|
| index e7d9f87fef474510b63479b66da42f4a8c5e27a6..0dcc6fc41ca483b155073a811ce4d2c6bb7dab94 100644
|
| --- a/ui/views/controls/table/table_view_unittest.cc
|
| +++ b/ui/views/controls/table/table_view_unittest.cc
|
| @@ -198,10 +198,11 @@ class TableViewTest : public testing::Test {
|
|
|
| void ClickOnRow(int row, int flags) {
|
| const int y = row * table_->row_height();
|
| - const ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, gfx::Point(0, y),
|
| - gfx::Point(0, y), ui::EventTimeForNow(),
|
| - ui::EF_LEFT_MOUSE_BUTTON | flags,
|
| - ui::EF_LEFT_MOUSE_BUTTON);
|
| + const ui::MouseEvent pressed(
|
| + ui::ET_MOUSE_PRESSED, gfx::Point(0, y), gfx::Point(0, y),
|
| + ui::EventTimeForNow(), ui::EF_LEFT_MOUSE_BUTTON | flags,
|
| + ui::EF_LEFT_MOUSE_BUTTON,
|
| + ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| table_->OnMousePressed(pressed);
|
| }
|
|
|
| @@ -296,14 +297,15 @@ TEST_F(TableViewTest, Resize) {
|
| const int x = table_->visible_columns()[0].width;
|
| EXPECT_NE(0, x);
|
| // Drag the mouse 1 pixel to the left.
|
| - const ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, gfx::Point(x, 0),
|
| - gfx::Point(x, 0), ui::EventTimeForNow(),
|
| - ui::EF_LEFT_MOUSE_BUTTON,
|
| - ui::EF_LEFT_MOUSE_BUTTON);
|
| + const ui::MouseEvent pressed(
|
| + ui::ET_MOUSE_PRESSED, gfx::Point(x, 0), gfx::Point(x, 0),
|
| + ui::EventTimeForNow(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON,
|
| + ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| helper_->header()->OnMousePressed(pressed);
|
| - const ui::MouseEvent dragged(ui::ET_MOUSE_DRAGGED, gfx::Point(x - 1, 0),
|
| - gfx::Point(x - 1, 0), ui::EventTimeForNow(),
|
| - ui::EF_LEFT_MOUSE_BUTTON, 0);
|
| + const ui::MouseEvent dragged(
|
| + ui::ET_MOUSE_DRAGGED, gfx::Point(x - 1, 0), gfx::Point(x - 1, 0),
|
| + ui::EventTimeForNow(), ui::EF_LEFT_MOUSE_BUTTON, 0,
|
| + ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| helper_->header()->OnMouseDragged(dragged);
|
|
|
| // This should shrink the first column and pull the second column in.
|
| @@ -394,16 +396,16 @@ TEST_F(TableViewTest, SortOnMouse) {
|
| const int x = table_->visible_columns()[0].width / 2;
|
| EXPECT_NE(0, x);
|
| // Press and release the mouse.
|
| - const ui::MouseEvent pressed(ui::ET_MOUSE_PRESSED, gfx::Point(x, 0),
|
| - gfx::Point(x, 0), ui::EventTimeForNow(),
|
| - ui::EF_LEFT_MOUSE_BUTTON,
|
| - ui::EF_LEFT_MOUSE_BUTTON);
|
| + const ui::MouseEvent pressed(
|
| + ui::ET_MOUSE_PRESSED, gfx::Point(x, 0), gfx::Point(x, 0),
|
| + ui::EventTimeForNow(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON,
|
| + ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| // The header must return true, else it won't normally get the release.
|
| EXPECT_TRUE(helper_->header()->OnMousePressed(pressed));
|
| - const ui::MouseEvent release(ui::ET_MOUSE_RELEASED, gfx::Point(x, 0),
|
| - gfx::Point(x, 0), ui::EventTimeForNow(),
|
| - ui::EF_LEFT_MOUSE_BUTTON,
|
| - ui::EF_LEFT_MOUSE_BUTTON);
|
| + const ui::MouseEvent release(
|
| + ui::ET_MOUSE_RELEASED, gfx::Point(x, 0), gfx::Point(x, 0),
|
| + ui::EventTimeForNow(), ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON,
|
| + ui::PointerEventDetails(ui::EventPointerType::POINTER_TYPE_MOUSE));
|
| helper_->header()->OnMouseReleased(release);
|
|
|
| ASSERT_EQ(1u, table_->sort_descriptors().size());
|
|
|