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

Side by Side Diff: ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc

Issue 2806783002: ash: Do not constrain window bounds if requested (Closed)
Patch Set: Remove dead code Created 3 years, 8 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h" 5 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 1576 matching lines...) Expand 10 before | Expand all | Expand 10 after
1587 EXPECT_TRUE(wm::GetWindowState(w2.get())->can_be_dragged()); 1587 EXPECT_TRUE(wm::GetWindowState(w2.get())->can_be_dragged());
1588 } 1588 }
1589 1589
1590 // Tests that windows that can control maximized bounds are not maximized 1590 // Tests that windows that can control maximized bounds are not maximized
1591 // and not tracked. 1591 // and not tracked.
1592 TEST_F(MaximizeModeWindowManagerTest, DontMaximizeClientManagedWindows) { 1592 TEST_F(MaximizeModeWindowManagerTest, DontMaximizeClientManagedWindows) {
1593 gfx::Rect rect(10, 10, 200, 50); 1593 gfx::Rect rect(10, 10, 200, 50);
1594 std::unique_ptr<aura::Window> window( 1594 std::unique_ptr<aura::Window> window(
1595 CreateWindow(ui::wm::WINDOW_TYPE_NORMAL, rect)); 1595 CreateWindow(ui::wm::WINDOW_TYPE_NORMAL, rect));
1596 1596
1597 wm::GetWindowState(window.get())->set_allow_set_bounds_in_maximized(true); 1597 wm::GetWindowState(window.get())->set_allow_set_bounds_direct(true);
1598 1598
1599 MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager(); 1599 MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager();
1600 EXPECT_FALSE(wm::GetWindowState(window.get())->IsMaximized()); 1600 EXPECT_FALSE(wm::GetWindowState(window.get())->IsMaximized());
1601 EXPECT_EQ(0, manager->GetNumberOfManagedWindows()); 1601 EXPECT_EQ(0, manager->GetNumberOfManagedWindows());
1602 } 1602 }
1603 1603
1604 namespace { 1604 namespace {
1605 1605
1606 class TestObserver : public wm::WindowStateObserver { 1606 class TestObserver : public wm::WindowStateObserver {
1607 public: 1607 public:
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
1697 EXPECT_EQ(1, observer.GetPostCountAndReset()); 1697 EXPECT_EQ(1, observer.GetPostCountAndReset());
1698 EXPECT_EQ(wm::WINDOW_STATE_TYPE_MINIMIZED, 1698 EXPECT_EQ(wm::WINDOW_STATE_TYPE_MINIMIZED,
1699 observer.GetLastOldStateAndReset()); 1699 observer.GetLastOldStateAndReset());
1700 1700
1701 window_state->RemoveObserver(&observer); 1701 window_state->RemoveObserver(&observer);
1702 1702
1703 DestroyMaximizeModeWindowManager(); 1703 DestroyMaximizeModeWindowManager();
1704 } 1704 }
1705 1705
1706 } // namespace ash 1706 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_window_manager.cc ('k') | ash/wm/maximize_mode/maximize_mode_window_state.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698