| Index: ui/views/controls/textfield/textfield_unittest.cc
|
| diff --git a/ui/views/controls/textfield/textfield_unittest.cc b/ui/views/controls/textfield/textfield_unittest.cc
|
| index 94615c6bff630b42433e84475b208ce757ab22db..949a242e5aa6d7d4e13099704fbea7fa8c366f62 100644
|
| --- a/ui/views/controls/textfield/textfield_unittest.cc
|
| +++ b/ui/views/controls/textfield/textfield_unittest.cc
|
| @@ -873,13 +873,14 @@ TEST_F(TextfieldTest, DragAndDrop_ToTheRight) {
|
| ui::MouseEvent click_a(ui::ET_MOUSE_PRESSED, point, point,
|
| ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
|
| textfield_->OnMousePressed(click_a);
|
| - EXPECT_TRUE(textfield_->CanStartDragForView(textfield_, click_a.location(),
|
| - gfx::Point()));
|
| - operations = textfield_->GetDragOperationsForView(textfield_,
|
| - click_a.location());
|
| + EXPECT_TRUE(textfield_->CanStartDragForView(
|
| + textfield_, gfx::ToFlooredPoint(click_a.location()), gfx::Point()));
|
| + operations = textfield_->GetDragOperationsForView(
|
| + textfield_, gfx::ToFlooredPoint(click_a.location()));
|
| EXPECT_EQ(ui::DragDropTypes::DRAG_MOVE | ui::DragDropTypes::DRAG_COPY,
|
| operations);
|
| - textfield_->WriteDragDataForView(NULL, click_a.location(), &data);
|
| + textfield_->WriteDragDataForView(
|
| + NULL, gfx::ToFlooredPoint(click_a.location()), &data);
|
| EXPECT_TRUE(data.GetString(&string));
|
| EXPECT_EQ(textfield_->GetSelectedText(), string);
|
| EXPECT_TRUE(textfield_->GetDropFormats(&formats, &custom_formats));
|
| @@ -926,13 +927,14 @@ TEST_F(TextfieldTest, DragAndDrop_ToTheLeft) {
|
| ui::MouseEvent click_a(ui::ET_MOUSE_PRESSED, point, point,
|
| ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
|
| textfield_->OnMousePressed(click_a);
|
| - EXPECT_TRUE(textfield_->CanStartDragForView(textfield_, click_a.location(),
|
| - gfx::Point()));
|
| - operations = textfield_->GetDragOperationsForView(textfield_,
|
| - click_a.location());
|
| + EXPECT_TRUE(textfield_->CanStartDragForView(
|
| + textfield_, gfx::ToFlooredPoint(click_a.location()), gfx::Point()));
|
| + operations = textfield_->GetDragOperationsForView(
|
| + textfield_, gfx::ToFlooredPoint(click_a.location()));
|
| EXPECT_EQ(ui::DragDropTypes::DRAG_MOVE | ui::DragDropTypes::DRAG_COPY,
|
| operations);
|
| - textfield_->WriteDragDataForView(NULL, click_a.location(), &data);
|
| + textfield_->WriteDragDataForView(
|
| + NULL, gfx::ToFlooredPoint(click_a.location()), &data);
|
| EXPECT_TRUE(data.GetString(&string));
|
| EXPECT_EQ(textfield_->GetSelectedText(), string);
|
| EXPECT_TRUE(textfield_->GetDropFormats(&formats, &custom_formats));
|
| @@ -974,7 +976,8 @@ TEST_F(TextfieldTest, DragAndDrop_Canceled) {
|
| ui::EF_LEFT_MOUSE_BUTTON, ui::EF_LEFT_MOUSE_BUTTON);
|
| textfield_->OnMousePressed(click);
|
| ui::OSExchangeData data;
|
| - textfield_->WriteDragDataForView(NULL, click.location(), &data);
|
| + textfield_->WriteDragDataForView(
|
| + NULL, gfx::ToFlooredPoint(click.location()), &data);
|
| EXPECT_TRUE(textfield_->CanDrop(data));
|
| // Drag the text over somewhere valid, outside the current selection.
|
| gfx::Point drop_point(GetCursorPositionX(2), 0);
|
|
|