| Index: ash/wm/toplevel_window_event_handler_unittest.cc
|
| diff --git a/ash/wm/toplevel_window_event_handler_unittest.cc b/ash/wm/toplevel_window_event_handler_unittest.cc
|
| index 3581f69a3bd2f3d9937dd9b0cf4a708bbba20541..53cac011c90f74e733d17dc86586e925585482e7 100644
|
| --- a/ash/wm/toplevel_window_event_handler_unittest.cc
|
| +++ b/ash/wm/toplevel_window_event_handler_unittest.cc
|
| @@ -135,7 +135,6 @@ TEST_F(ToplevelWindowEventHandlerTest, WindowPositionAutoManagement) {
|
| generator.PressLeftButton();
|
| aura::client::WindowMoveClient* move_client =
|
| aura::client::GetWindowMoveClient(w1->GetRootWindow());
|
| - // generator.PressLeftButton();
|
| base::ThreadTaskRunnerHandle::Get()->PostTask(
|
| FROM_HERE,
|
| base::Bind(&ContinueAndCompleteDrag, base::Unretained(&generator),
|
| @@ -169,36 +168,6 @@ TEST_F(ToplevelWindowEventHandlerTest, WindowPositionAutoManagement) {
|
| EXPECT_EQ(size.ToString(), w1->bounds().size().ToString());
|
| }
|
|
|
| -namespace {
|
| -
|
| -class CancelDragObserver : public aura::WindowObserver {
|
| - public:
|
| - CancelDragObserver() {}
|
| - ~CancelDragObserver() override {}
|
| -
|
| - void OnWindowHierarchyChanging(const HierarchyChangeParams& params) override {
|
| - aura::client::CaptureClient* client =
|
| - aura::client::GetCaptureClient(params.target->GetRootWindow());
|
| - client->SetCapture(nullptr);
|
| - }
|
| -
|
| - private:
|
| - DISALLOW_COPY_AND_ASSIGN(CancelDragObserver);
|
| -};
|
| -
|
| -} // namespace
|
| -
|
| -// Cancelling drag while starting window drag should not crash.
|
| -TEST_F(ToplevelWindowEventHandlerTest, CancelWhileDragStart) {
|
| - std::unique_ptr<aura::Window> w1(CreateWindow(HTCAPTION));
|
| - CancelDragObserver observer;
|
| - w1->AddObserver(&observer);
|
| - gfx::Point origin = w1->bounds().origin();
|
| - DragFromCenterBy(w1.get(), 100, 100);
|
| - EXPECT_EQ(origin, w1->bounds().origin());
|
| - w1->RemoveObserver(&observer);
|
| -}
|
| -
|
| TEST_F(ToplevelWindowEventHandlerTest, BottomRight) {
|
| std::unique_ptr<aura::Window> w1(CreateWindow(HTBOTTOMRIGHT));
|
| gfx::Point position = w1->bounds().origin();
|
| @@ -836,7 +805,7 @@ TEST_F(ToplevelWindowEventHandlerTest, DragSnappedWindowToExternalDisplay) {
|
| // Snap the window to the right.
|
| wm::WindowState* window_state = wm::GetWindowState(w1.get());
|
| ASSERT_TRUE(window_state->CanSnap());
|
| - const wm::WMEvent event(wm::WM_EVENT_CYCLE_SNAP_DOCK_RIGHT);
|
| + const wm::WMEvent event(wm::WM_EVENT_CYCLE_SNAP_RIGHT);
|
| window_state->OnWMEvent(&event);
|
| ASSERT_TRUE(window_state->IsSnapped());
|
|
|
|
|