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

Unified Diff: ash/wm/toplevel_window_event_handler_unittest.cc

Issue 2700523004: Remove docked windows entirely in M59. (Closed)
Patch Set: oshima + mfomitchev comments Created 3 years, 10 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
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 23aa801cdff39f3585313bc7d482e773b895dbad..9bf0fb61f314a225c7555561eb13799ed4dee469 100644
--- a/ash/wm/toplevel_window_event_handler_unittest.cc
+++ b/ash/wm/toplevel_window_event_handler_unittest.cc
@@ -134,7 +134,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),
@@ -168,36 +167,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();
@@ -830,7 +799,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());

Powered by Google App Engine
This is Rietveld 408576698