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

Unified Diff: ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc

Issue 2249953002: Do not automatically maximize the window if the maximized bounds can be controlled by the client. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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/common/wm/maximize_mode/maximize_mode_window_manager.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc
diff --git a/ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc b/ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc
index f12980bc86c5d63e803da7abf2ff79cf5d065575..77fe2359e5bad7c65a9ef22cf674140458ff16c3 100644
--- a/ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc
+++ b/ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc
@@ -1583,6 +1583,20 @@ TEST_F(MaximizeModeWindowManagerTest, DontMaximizeDockedWindows) {
EXPECT_EQ(0, manager->GetNumberOfManagedWindows());
}
+// Tests that windows that can control maximized bounds are not maximized
+// and not tracked.
+TEST_F(MaximizeModeWindowManagerTest, DontMaximizeClientManagedWindows) {
+ gfx::Rect rect(10, 10, 200, 50);
+ std::unique_ptr<aura::Window> window(
+ CreateWindow(ui::wm::WINDOW_TYPE_NORMAL, rect));
+
+ wm::GetWindowState(window.get())->set_allow_set_bounds_in_maximized(true);
+
+ MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager();
+ EXPECT_FALSE(wm::GetWindowState(window.get())->IsMaximized());
+ EXPECT_EQ(0, manager->GetNumberOfManagedWindows());
+}
+
namespace {
class TestObserver : public wm::WindowStateObserver {
« no previous file with comments | « ash/common/wm/maximize_mode/maximize_mode_window_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698