This source file includes following definitions.
- SetUp
- TearDown
- CalculateDragPoint
- shelf_layout_manager
- CreateDragWindowResizer
- WarpMouseCursorIfNecessary
- TEST_F
- TEST_F
- TEST_F
- TEST_F
- TEST_F
- TEST_F
- TEST_F
#include "ash/wm/drag_window_resizer.h"
#include "ash/display/mouse_cursor_event_filter.h"
#include "ash/root_window_controller.h"
#include "ash/shelf/shelf_layout_manager.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
#include "ash/test/ash_test_base.h"
#include "ash/test/cursor_manager_test_api.h"
#include "ash/wm/drag_window_controller.h"
#include "ash/wm/window_util.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "ui/aura/client/aura_constants.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/window_event_dispatcher.h"
#include "ui/base/hit_test.h"
#include "ui/base/ui_base_types.h"
#include "ui/compositor/layer_tree_owner.h"
#include "ui/gfx/insets.h"
#include "ui/gfx/screen.h"
#include "ui/views/widget/widget.h"
#include "ui/wm/core/window_util.h"
namespace ash {
namespace {
const int kRootHeight = 600;
}
class DragWindowResizerTest : public test::AshTestBase {
public:
DragWindowResizerTest() {}
virtual ~DragWindowResizerTest() {}
virtual void SetUp() OVERRIDE {
AshTestBase::SetUp();
UpdateDisplay(base::StringPrintf("800x%d", kRootHeight));
aura::Window* root = Shell::GetPrimaryRootWindow();
gfx::Rect root_bounds(root->bounds());
EXPECT_EQ(kRootHeight, root_bounds.height());
EXPECT_EQ(800, root_bounds.width());
Shell::GetInstance()->SetDisplayWorkAreaInsets(root, gfx::Insets());
window_.reset(new aura::Window(&delegate_));
window_->SetType(ui::wm::WINDOW_TYPE_NORMAL);
window_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
ParentWindowInPrimaryRootWindow(window_.get());
window_->set_id(1);
always_on_top_window_.reset(new aura::Window(&delegate2_));
always_on_top_window_->SetType(ui::wm::WINDOW_TYPE_NORMAL);
always_on_top_window_->SetProperty(aura::client::kAlwaysOnTopKey, true);
always_on_top_window_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
ParentWindowInPrimaryRootWindow(always_on_top_window_.get());
always_on_top_window_->set_id(2);
system_modal_window_.reset(new aura::Window(&delegate3_));
system_modal_window_->SetType(ui::wm::WINDOW_TYPE_NORMAL);
system_modal_window_->SetProperty(aura::client::kModalKey,
ui::MODAL_TYPE_SYSTEM);
system_modal_window_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
ParentWindowInPrimaryRootWindow(system_modal_window_.get());
system_modal_window_->set_id(3);
transient_child_ = new aura::Window(&delegate4_);
transient_child_->SetType(ui::wm::WINDOW_TYPE_NORMAL);
transient_child_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
ParentWindowInPrimaryRootWindow(transient_child_);
transient_child_->set_id(4);
transient_parent_.reset(new aura::Window(&delegate5_));
transient_parent_->SetType(ui::wm::WINDOW_TYPE_NORMAL);
transient_parent_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
ParentWindowInPrimaryRootWindow(transient_parent_.get());
::wm::AddTransientChild(transient_parent_.get(), transient_child_);
transient_parent_->set_id(5);
panel_window_.reset(new aura::Window(&delegate6_));
panel_window_->SetType(ui::wm::WINDOW_TYPE_PANEL);
panel_window_->Init(aura::WINDOW_LAYER_NOT_DRAWN);
ParentWindowInPrimaryRootWindow(panel_window_.get());
}
virtual void TearDown() OVERRIDE {
window_.reset();
always_on_top_window_.reset();
system_modal_window_.reset();
transient_parent_.reset();
panel_window_.reset();
AshTestBase::TearDown();
}
protected:
gfx::Point CalculateDragPoint(const WindowResizer& resizer,
int delta_x,
int delta_y) const {
gfx::Point location = resizer.GetInitialLocation();
location.set_x(location.x() + delta_x);
location.set_y(location.y() + delta_y);
return location;
}
ShelfLayoutManager* shelf_layout_manager() {
return Shell::GetPrimaryRootWindowController()->GetShelfLayoutManager();
}
static WindowResizer* CreateDragWindowResizer(
aura::Window* window,
const gfx::Point& point_in_parent,
int window_component) {
return CreateWindowResizer(
window,
point_in_parent,
window_component,
aura::client::WINDOW_MOVE_SOURCE_MOUSE).release();
}
bool WarpMouseCursorIfNecessary(aura::Window* target_root,
const gfx::Point& point_in_screen) {
MouseCursorEventFilter* event_filter =
Shell::GetInstance()->mouse_cursor_filter();
bool is_warped = event_filter->WarpMouseCursorIfNecessary(target_root,
point_in_screen);
event_filter->reset_was_mouse_warped_for_test();
return is_warped;
}
aura::test::TestWindowDelegate delegate_;
aura::test::TestWindowDelegate delegate2_;
aura::test::TestWindowDelegate delegate3_;
aura::test::TestWindowDelegate delegate4_;
aura::test::TestWindowDelegate delegate5_;
aura::test::TestWindowDelegate delegate6_;
scoped_ptr<aura::Window> window_;
scoped_ptr<aura::Window> always_on_top_window_;
scoped_ptr<aura::Window> system_modal_window_;
scoped_ptr<aura::Window> panel_window_;
aura::Window* transient_child_;
scoped_ptr<aura::Window> transient_parent_;
private:
DISALLOW_COPY_AND_ASSIGN(DragWindowResizerTest);
};
TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplays) {
if (!SupportsMultipleDisplays())
return;
UpdateDisplay("800x600,400x300");
aura::Window::Windows root_windows = Shell::GetAllRootWindows();
ASSERT_EQ(2U, root_windows.size());
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
Shell::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
{
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window_.get(), gfx::Point(), HTCAPTION));
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, 800, 10), 0);
resizer->CompleteDrag();
EXPECT_EQ(root_windows[1], window_->GetRootWindow());
EXPECT_EQ("0,10 50x60", window_->bounds().ToString());
}
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
Shell::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
{
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window_.get(), gfx::Point(), HTCAPTION));
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, 795, 10), 0);
EXPECT_EQ("790,10 50x60", window_->bounds().ToString());
resizer->CompleteDrag();
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
EXPECT_EQ("790,10 50x60", window_->bounds().ToString());
}
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
Shell::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
{
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window_.get(), gfx::Point(49, 0), HTCAPTION));
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, 751, 10), ui::EF_CONTROL_DOWN);
resizer->CompleteDrag();
EXPECT_EQ(root_windows[1], window_->GetRootWindow());
int expected_x = -50 + 10;
EXPECT_EQ(base::IntToString(expected_x) + ",10 50x60",
window_->bounds().ToString());
}
window_->SetBoundsInScreen(gfx::Rect(0, 0, 700, 500),
Shell::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
{
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window_.get(), gfx::Point(699, 0), HTCAPTION));
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, 101, 10), ui::EF_CONTROL_DOWN);
resizer->CompleteDrag();
EXPECT_EQ(root_windows[1], window_->GetRootWindow());
EXPECT_EQ("400x253", window_->bounds().size().ToString());
gfx::Rect window_bounds_in_screen = window_->GetBoundsInScreen();
gfx::Rect intersect(window_->GetRootWindow()->GetBoundsInScreen());
intersect.Intersect(window_bounds_in_screen);
EXPECT_LE(10, intersect.width());
EXPECT_LE(10, intersect.height());
EXPECT_TRUE(window_bounds_in_screen.Contains(gfx::Point(800, 10)));
}
window_->SetBoundsInScreen(gfx::Rect(0, 0, 700, 500),
Shell::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
{
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window_.get(), gfx::Point(0, 0), HTCAPTION));
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, 799, 10), ui::EF_CONTROL_DOWN);
resizer->Drag(CalculateDragPoint(*resizer, 850, 10), ui::EF_CONTROL_DOWN);
resizer->CompleteDrag();
EXPECT_EQ(root_windows[1], window_->GetRootWindow());
EXPECT_EQ("400x253", window_->bounds().size().ToString());
gfx::Rect window_bounds_in_screen = window_->GetBoundsInScreen();
gfx::Rect intersect(window_->GetRootWindow()->GetBoundsInScreen());
intersect.Intersect(window_bounds_in_screen);
EXPECT_LE(10, intersect.width());
EXPECT_LE(10, intersect.height());
EXPECT_TRUE(window_bounds_in_screen.Contains(gfx::Point(850, 10)));
}
}
TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplaysActiveRoot) {
if (!SupportsMultipleDisplays())
return;
UpdateDisplay("800x600,800x600");
aura::Window::Windows root_windows = Shell::GetAllRootWindows();
ASSERT_EQ(2U, root_windows.size());
aura::test::TestWindowDelegate delegate;
scoped_ptr<aura::Window> window(new aura::Window(&delegate));
window->SetType(ui::wm::WINDOW_TYPE_NORMAL);
window->Init(aura::WINDOW_LAYER_TEXTURED);
ParentWindowInPrimaryRootWindow(window.get());
window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
Shell::GetScreen()->GetPrimaryDisplay());
window->Show();
EXPECT_TRUE(ash::wm::CanActivateWindow(window.get()));
ash::wm::ActivateWindow(window.get());
EXPECT_EQ(root_windows[0], window->GetRootWindow());
EXPECT_EQ(root_windows[0], ash::Shell::GetTargetRootWindow());
{
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window.get(), gfx::Point(), HTCAPTION));
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, 800, 10), 0);
resizer->CompleteDrag();
EXPECT_EQ(root_windows[1], window->GetRootWindow());
EXPECT_EQ(root_windows[1], ash::Shell::GetTargetRootWindow());
}
}
TEST_F(DragWindowResizerTest, WindowDragWithMultiDisplaysRightToLeft) {
if (!SupportsMultipleDisplays())
return;
UpdateDisplay("800x600,800x600");
aura::Window::Windows root_windows = Shell::GetAllRootWindows();
ASSERT_EQ(2U, root_windows.size());
window_->SetBoundsInScreen(
gfx::Rect(800, 00, 50, 60),
Shell::GetScreen()->GetDisplayNearestWindow(root_windows[1]));
EXPECT_EQ(root_windows[1], window_->GetRootWindow());
{
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window_.get(), gfx::Point(), HTCAPTION));
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, -2, 0), ui::EF_CONTROL_DOWN);
resizer->CompleteDrag();
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
int expected_x = 800 - 10;
EXPECT_EQ(base::IntToString(expected_x) + ",0 50x60",
window_->bounds().ToString());
}
}
TEST_F(DragWindowResizerTest, DragWindowController) {
if (!SupportsMultipleDisplays())
return;
UpdateDisplay("800x600,800x600");
aura::Window::Windows root_windows = Shell::GetAllRootWindows();
ASSERT_EQ(2U, root_windows.size());
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
Shell::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity());
{
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window_.get(), gfx::Point(), HTCAPTION));
ASSERT_TRUE(resizer.get());
DragWindowResizer* drag_resizer = DragWindowResizer::instance_;
ASSERT_TRUE(drag_resizer);
EXPECT_FALSE(drag_resizer->drag_window_controller_.get());
resizer->Drag(CalculateDragPoint(*resizer, 10, 10), 0);
EXPECT_FALSE(drag_resizer->drag_window_controller_.get());
resizer->Drag(CalculateDragPoint(*resizer, 798, 10), 0);
DragWindowController* controller =
drag_resizer->drag_window_controller_.get();
ASSERT_TRUE(controller);
ASSERT_TRUE(controller->drag_widget_);
ui::Layer* drag_layer =
controller->drag_widget_->GetNativeWindow()->layer();
ASSERT_TRUE(drag_layer);
const std::vector<ui::Layer*>& layers = drag_layer->children();
EXPECT_FALSE(layers.empty());
EXPECT_EQ(controller->layer_owner_->root(), layers.back());
EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity());
ASSERT_TRUE(controller->drag_widget_);
EXPECT_GT(1.0f, drag_layer->opacity());
resizer->Drag(CalculateDragPoint(*resizer, 800, 10), 0);
controller = drag_resizer->drag_window_controller_.get();
ASSERT_TRUE(controller);
EXPECT_GT(1.0f, window_->layer()->opacity());
EXPECT_FLOAT_EQ(1.0f, drag_layer->opacity());
resizer->CompleteDrag();
EXPECT_EQ(root_windows[1], window_->GetRootWindow());
EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity());
}
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
Shell::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity());
{
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window_.get(), gfx::Point(), HTCAPTION));
ASSERT_TRUE(resizer.get());
DragWindowResizer* drag_resizer = DragWindowResizer::instance_;
ASSERT_TRUE(drag_resizer);
EXPECT_FALSE(drag_resizer->drag_window_controller_.get());
resizer->Drag(CalculateDragPoint(*resizer, 0, 610), 0);
resizer->RevertDrag();
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
EXPECT_FLOAT_EQ(1.0f, window_->layer()->opacity());
}
}
TEST_F(DragWindowResizerTest, WarpMousePointer) {
MouseCursorEventFilter* event_filter =
Shell::GetInstance()->mouse_cursor_filter();
ASSERT_TRUE(event_filter);
window_->SetBounds(gfx::Rect(0, 0, 50, 60));
EXPECT_EQ(MouseCursorEventFilter::WARP_ALWAYS,
event_filter->mouse_warp_mode_);
{
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window_.get(), gfx::Point(), HTCAPTION));
EXPECT_EQ(MouseCursorEventFilter::WARP_DRAG,
event_filter->mouse_warp_mode_);
resizer->CompleteDrag();
}
EXPECT_EQ(MouseCursorEventFilter::WARP_ALWAYS,
event_filter->mouse_warp_mode_);
{
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window_.get(), gfx::Point(), HTCAPTION));
EXPECT_EQ(MouseCursorEventFilter::WARP_DRAG,
event_filter->mouse_warp_mode_);
resizer->RevertDrag();
}
EXPECT_EQ(MouseCursorEventFilter::WARP_ALWAYS,
event_filter->mouse_warp_mode_);
{
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window_.get(), gfx::Point(), HTRIGHT));
EXPECT_EQ(MouseCursorEventFilter::WARP_NONE,
event_filter->mouse_warp_mode_);
resizer->CompleteDrag();
}
EXPECT_EQ(MouseCursorEventFilter::WARP_ALWAYS,
event_filter->mouse_warp_mode_);
{
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window_.get(), gfx::Point(), HTRIGHT));
EXPECT_EQ(MouseCursorEventFilter::WARP_NONE,
event_filter->mouse_warp_mode_);
resizer->RevertDrag();
}
EXPECT_EQ(MouseCursorEventFilter::WARP_ALWAYS,
event_filter->mouse_warp_mode_);
}
TEST_F(DragWindowResizerTest, CursorDeviceScaleFactor) {
if (!SupportsMultipleDisplays())
return;
UpdateDisplay("400x400,800x800*2");
aura::Window::Windows root_windows = Shell::GetAllRootWindows();
ASSERT_EQ(2U, root_windows.size());
test::CursorManagerTestApi cursor_test_api(
Shell::GetInstance()->cursor_manager());
{
window_->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
Shell::GetScreen()->GetPrimaryDisplay());
EXPECT_EQ(root_windows[0], window_->GetRootWindow());
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window_.get(), gfx::Point(), HTCAPTION));
EXPECT_EQ(1.0f, cursor_test_api.GetDisplay().device_scale_factor());
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
WarpMouseCursorIfNecessary(root_windows[0], gfx::Point(399, 200));
EXPECT_EQ(2.0f, cursor_test_api.GetDisplay().device_scale_factor());
resizer->CompleteDrag();
EXPECT_EQ(2.0f, cursor_test_api.GetDisplay().device_scale_factor());
}
{
aura::Window* default_container =
GetRootWindowController(root_windows[1])
->GetContainer(kShellWindowId_DefaultContainer);
default_container->AddChild(window_.get());
window_->SetBoundsInScreen(
gfx::Rect(600, 0, 50, 60),
Shell::GetScreen()->GetDisplayNearestWindow(root_windows[1]));
EXPECT_EQ(root_windows[1], window_->GetRootWindow());
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window_.get(), gfx::Point(), HTCAPTION));
EXPECT_EQ(2.0f, cursor_test_api.GetDisplay().device_scale_factor());
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, -200, 200), 0);
WarpMouseCursorIfNecessary(root_windows[1], gfx::Point(400, 200));
EXPECT_EQ(1.0f, cursor_test_api.GetDisplay().device_scale_factor());
resizer->CompleteDrag();
EXPECT_EQ(1.0f, cursor_test_api.GetDisplay().device_scale_factor());
}
}
TEST_F(DragWindowResizerTest, MoveWindowAcrossDisplays) {
if (!SupportsMultipleDisplays())
return;
UpdateDisplay("400x400,400x400");
aura::Window::Windows root_windows = Shell::GetAllRootWindows();
ASSERT_EQ(2U, root_windows.size());
{
aura::Window* window = window_.get();
window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
Shell::GetScreen()->GetPrimaryDisplay());
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window, gfx::Point(), HTCAPTION));
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0],
gfx::Point(399, 200)));
resizer->CompleteDrag();
}
{
aura::Window* window = always_on_top_window_.get();
window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
Shell::GetScreen()->GetPrimaryDisplay());
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window, gfx::Point(), HTCAPTION));
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0],
gfx::Point(399, 200)));
resizer->CompleteDrag();
}
{
aura::Window* window = system_modal_window_.get();
window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
Shell::GetScreen()->GetPrimaryDisplay());
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window, gfx::Point(), HTCAPTION));
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0],
gfx::Point(399, 200)));
resizer->CompleteDrag();
}
{
aura::Window* window = transient_child_;
window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
Shell::GetScreen()->GetPrimaryDisplay());
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window, gfx::Point(), HTCAPTION));
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
EXPECT_FALSE(WarpMouseCursorIfNecessary(
root_windows[0],
gfx::Point(399, 200)));
resizer->CompleteDrag();
}
{
aura::Window* window = transient_parent_.get();
window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
Shell::GetScreen()->GetPrimaryDisplay());
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window, gfx::Point(), HTCAPTION));
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0],
gfx::Point(399, 200)));
resizer->CompleteDrag();
}
{
aura::Window* window = panel_window_.get();
window->SetBoundsInScreen(gfx::Rect(0, 0, 50, 60),
Shell::GetScreen()->GetPrimaryDisplay());
scoped_ptr<WindowResizer> resizer(CreateDragWindowResizer(
window, gfx::Point(), HTCAPTION));
ASSERT_TRUE(resizer.get());
resizer->Drag(CalculateDragPoint(*resizer, 399, 200), 0);
EXPECT_TRUE(WarpMouseCursorIfNecessary(root_windows[0],
gfx::Point(399, 200)));
resizer->CompleteDrag();
}
}
}