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

Side by Side Diff: ash/wm/frame_painter_unittest.cc

Issue 16093036: Do not create a workspace for a maximized window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix test failure Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/wm/workspace/workspace.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/frame_painter.h" 5 #include "ash/wm/frame_painter.h"
6 6
7 #include "ash/ash_constants.h" 7 #include "ash/ash_constants.h"
8 #include "ash/shell.h" 8 #include "ash/shell.h"
9 #include "ash/shell_window_ids.h" 9 #include "ash/shell_window_ids.h"
10 #include "ash/test/ash_test_base.h" 10 #include "ash/test/ash_test_base.h"
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
298 EXPECT_FALSE(p1.UseSoloWindowHeader()); 298 EXPECT_FALSE(p1.UseSoloWindowHeader());
299 299
300 // Hide one window. Solo should be enabled. 300 // Hide one window. Solo should be enabled.
301 w2->Hide(); 301 w2->Hide();
302 EXPECT_TRUE(p1.UseSoloWindowHeader()); 302 EXPECT_TRUE(p1.UseSoloWindowHeader());
303 303
304 // Show that window. Solo should be disabled. 304 // Show that window. Solo should be disabled.
305 w2->Show(); 305 w2->Show();
306 EXPECT_FALSE(p1.UseSoloWindowHeader()); 306 EXPECT_FALSE(p1.UseSoloWindowHeader());
307 307
308 // Maximize the window, then activate the first window. The second window
309 // is in its own workspace, so solo should be active for the first one.
310 w2->Maximize();
311 w1->Activate();
312 EXPECT_TRUE(p1.UseSoloWindowHeader());
313
314 // Switch to the second window and restore it. Solo should be disabled.
315 w2->Activate();
316 w2->Restore();
317 EXPECT_FALSE(p2.UseSoloWindowHeader());
318
319 // Minimize the second window. Solo should be enabled. 308 // Minimize the second window. Solo should be enabled.
320 w2->Minimize(); 309 w2->Minimize();
321 EXPECT_TRUE(p1.UseSoloWindowHeader()); 310 EXPECT_TRUE(p1.UseSoloWindowHeader());
322 311
323 // Close the minimized window. 312 // Close the minimized window.
324 w2.reset(); 313 w2.reset();
325 EXPECT_TRUE(p1.UseSoloWindowHeader()); 314 EXPECT_TRUE(p1.UseSoloWindowHeader());
326 315
327 // Open an always-on-top widget (which lives in a different container). 316 // Open an always-on-top widget (which lives in a different container).
328 scoped_ptr<Widget> w3(CreateAlwaysOnTopWidget()); 317 scoped_ptr<Widget> w3(CreateAlwaysOnTopWidget());
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
648 SetTrackedByWorkspace(w->GetNativeWindow(), false); 637 SetTrackedByWorkspace(w->GetNativeWindow(), false);
649 EXPECT_FALSE(p.ShouldUseMinimalHeaderStyle(FramePainter::THEMED_NO)); 638 EXPECT_FALSE(p.ShouldUseMinimalHeaderStyle(FramePainter::THEMED_NO));
650 SetTrackedByWorkspace(w->GetNativeWindow(), true); 639 SetTrackedByWorkspace(w->GetNativeWindow(), true);
651 640
652 w->GetNativeWindow()->GetRootWindow()->SetProperty( 641 w->GetNativeWindow()->GetRootWindow()->SetProperty(
653 ash::internal::kCyclingThroughWorkspacesKey, true); 642 ash::internal::kCyclingThroughWorkspacesKey, true);
654 EXPECT_FALSE(p.ShouldUseMinimalHeaderStyle(FramePainter::THEMED_NO)); 643 EXPECT_FALSE(p.ShouldUseMinimalHeaderStyle(FramePainter::THEMED_NO));
655 } 644 }
656 645
657 } // namespace ash 646 } // namespace ash
OLDNEW
« no previous file with comments | « ash/shelf/shelf_layout_manager_unittest.cc ('k') | ash/wm/workspace/workspace.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698