Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(456)

Unified Diff: ui/views/controls/textfield/native_textfield_views_unittest.cc

Issue 10824295: Rid the world of the last of views::Event types: TouchEvent, GestureEvent, MouseWheelEvent, ScrollE… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/controls/textfield/native_textfield_views.cc ('k') | ui/views/controls/tree/tree_view_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/controls/textfield/native_textfield_views_unittest.cc
===================================================================
--- ui/views/controls/textfield/native_textfield_views_unittest.cc (revision 151481)
+++ ui/views/controls/textfield/native_textfield_views_unittest.cc (working copy)
@@ -30,7 +30,6 @@
#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/controls/textfield/textfield_controller.h"
#include "ui/views/controls/textfield/textfield_views_model.h"
-#include "ui/views/events/event.h"
#include "ui/views/focus/focus_manager.h"
#include "ui/views/ime/mock_input_method.h"
#include "ui/views/test/test_views_delegate.h"
@@ -863,7 +862,8 @@
EXPECT_EQ(ui::OSExchangeData::STRING, formats);
EXPECT_TRUE(custom_formats.empty());
EXPECT_TRUE(textfield_view_->CanDrop(data));
- DropTargetEvent drop(data, GetCursorPositionX(6), 0,
+ gfx::Point drop_point(GetCursorPositionX(6), 0);
+ ui::DropTargetEvent drop(data, drop_point, drop_point,
ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_MOVE);
EXPECT_EQ(ui::DragDropTypes::DRAG_COPY | ui::DragDropTypes::DRAG_MOVE,
textfield_view_->OnDragUpdated(drop));
@@ -964,7 +964,7 @@
// Drop "ello" after "w".
const gfx::Point kDropPoint(GetCursorPositionX(7), 0);
EXPECT_TRUE(textfield_view_->CanDrop(data));
- DropTargetEvent drop_a(data, kDropPoint.x(), 0, operations);
+ ui::DropTargetEvent drop_a(data, kDropPoint, kDropPoint, operations);
EXPECT_EQ(ui::DragDropTypes::DRAG_MOVE,
textfield_view_->OnDragUpdated(drop_a));
EXPECT_EQ(ui::DragDropTypes::DRAG_MOVE,
@@ -1018,7 +1018,8 @@
// Drop " worl" after "h".
EXPECT_TRUE(textfield_view_->CanDrop(data));
- DropTargetEvent drop_a(data, GetCursorPositionX(1), 0, operations);
+ gfx::Point drop_point(GetCursorPositionX(1), 0);
+ ui::DropTargetEvent drop_a(data, drop_point, drop_point, operations);
EXPECT_EQ(ui::DragDropTypes::DRAG_MOVE,
textfield_view_->OnDragUpdated(drop_a));
EXPECT_EQ(ui::DragDropTypes::DRAG_MOVE,
@@ -1055,8 +1056,9 @@
textfield_view_->WriteDragDataForView(NULL, click.location(), &data);
EXPECT_TRUE(textfield_view_->CanDrop(data));
// Drag the text over somewhere valid, outside the current selection.
- DropTargetEvent drop(data, GetCursorPositionX(2), 0,
- ui::DragDropTypes::DRAG_MOVE);
+ gfx::Point drop_point(GetCursorPositionX(2), 0);
+ ui::DropTargetEvent drop(data, drop_point, drop_point,
+ ui::DragDropTypes::DRAG_MOVE);
EXPECT_EQ(ui::DragDropTypes::DRAG_MOVE, textfield_view_->OnDragUpdated(drop));
// "Cancel" the drag, via move and release over the selection, and OnDragDone.
gfx::Point drag_point(GetCursorPositionX(9), 0);
« no previous file with comments | « ui/views/controls/textfield/native_textfield_views.cc ('k') | ui/views/controls/tree/tree_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698