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

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

Issue 2822613004: [M58] ash: Do not constrain window bounds if requested (Closed)
Patch Set: 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
« no previous file with comments | « ash/common/wm/window_state.h ('k') | ash/wm/window_state_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/common/wm/maximize_mode/maximize_mode_window_manager.h" 5 #include "ash/common/wm/maximize_mode/maximize_mode_window_manager.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/common/ash_switches.h" 9 #include "ash/common/ash_switches.h"
10 #include "ash/common/shelf/wm_shelf.h" 10 #include "ash/common/shelf/wm_shelf.h"
(...skipping 1581 matching lines...) Expand 10 before | Expand all | Expand 10 after
1592 EXPECT_EQ(0, manager->GetNumberOfManagedWindows()); 1592 EXPECT_EQ(0, manager->GetNumberOfManagedWindows());
1593 } 1593 }
1594 1594
1595 // Tests that windows that can control maximized bounds are not maximized 1595 // Tests that windows that can control maximized bounds are not maximized
1596 // and not tracked. 1596 // and not tracked.
1597 TEST_F(MaximizeModeWindowManagerTest, DontMaximizeClientManagedWindows) { 1597 TEST_F(MaximizeModeWindowManagerTest, DontMaximizeClientManagedWindows) {
1598 gfx::Rect rect(10, 10, 200, 50); 1598 gfx::Rect rect(10, 10, 200, 50);
1599 std::unique_ptr<aura::Window> window( 1599 std::unique_ptr<aura::Window> window(
1600 CreateWindow(ui::wm::WINDOW_TYPE_NORMAL, rect)); 1600 CreateWindow(ui::wm::WINDOW_TYPE_NORMAL, rect));
1601 1601
1602 wm::GetWindowState(window.get())->set_allow_set_bounds_in_maximized(true); 1602 wm::GetWindowState(window.get())->set_allow_set_bounds_direct(true);
1603 1603
1604 MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager(); 1604 MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager();
1605 EXPECT_FALSE(wm::GetWindowState(window.get())->IsMaximized()); 1605 EXPECT_FALSE(wm::GetWindowState(window.get())->IsMaximized());
1606 EXPECT_EQ(0, manager->GetNumberOfManagedWindows()); 1606 EXPECT_EQ(0, manager->GetNumberOfManagedWindows());
1607 } 1607 }
1608 1608
1609 namespace { 1609 namespace {
1610 1610
1611 class TestObserver : public wm::WindowStateObserver { 1611 class TestObserver : public wm::WindowStateObserver {
1612 public: 1612 public:
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
1702 EXPECT_EQ(1, observer.GetPostCountAndReset()); 1702 EXPECT_EQ(1, observer.GetPostCountAndReset());
1703 EXPECT_EQ(wm::WINDOW_STATE_TYPE_MINIMIZED, 1703 EXPECT_EQ(wm::WINDOW_STATE_TYPE_MINIMIZED,
1704 observer.GetLastOldStateAndReset()); 1704 observer.GetLastOldStateAndReset());
1705 1705
1706 window_state->RemoveObserver(&observer); 1706 window_state->RemoveObserver(&observer);
1707 1707
1708 DestroyMaximizeModeWindowManager(); 1708 DestroyMaximizeModeWindowManager();
1709 } 1709 }
1710 1710
1711 } // namespace ash 1711 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/wm/window_state.h ('k') | ash/wm/window_state_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698