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

Unified Diff: ash/wm/toplevel_window_event_handler_unittest.cc

Issue 2700523004: Remove docked windows entirely in M59. (Closed)
Patch Set: Rebase Created 3 years, 9 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 | « ash/wm/overview/window_selector_unittest.cc ('k') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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());
« no previous file with comments | « ash/wm/overview/window_selector_unittest.cc ('k') | ash/wm/workspace/workspace_window_resizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698