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

Side by Side Diff: ash/wm/dock/docked_window_resizer_unittest.cc

Issue 169713003: Remove WindowState::IsNormalShowState() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ash/wm/dock/docked_window_resizer.cc ('k') | ash/wm/drag_details.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 (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/dock/docked_window_resizer.h" 5 #include "ash/wm/dock/docked_window_resizer.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/root_window_controller.h" 8 #include "ash/root_window_controller.h"
9 #include "ash/screen_util.h" 9 #include "ash/screen_util.h"
10 #include "ash/shelf/shelf.h" 10 #include "ash/shelf/shelf.h"
(...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after
509 wm::WindowState* window_state = wm::GetWindowState(window.get()); 509 wm::WindowState* window_state = wm::GetWindowState(window.get());
510 // Minimize the window, it should be hidden. 510 // Minimize the window, it should be hidden.
511 window_state->Minimize(); 511 window_state->Minimize();
512 RunAllPendingInMessageLoop(); 512 RunAllPendingInMessageLoop();
513 EXPECT_FALSE(window->IsVisible()); 513 EXPECT_FALSE(window->IsVisible());
514 EXPECT_TRUE(window_state->IsMinimized()); 514 EXPECT_TRUE(window_state->IsMinimized());
515 // Restore the window; window should be visible. 515 // Restore the window; window should be visible.
516 window_state->Restore(); 516 window_state->Restore();
517 RunAllPendingInMessageLoop(); 517 RunAllPendingInMessageLoop();
518 EXPECT_TRUE(window->IsVisible()); 518 EXPECT_TRUE(window->IsVisible());
519 EXPECT_TRUE(window_state->IsNormalShowState()); 519 EXPECT_TRUE(window_state->IsNormalShowType());
520 } 520 }
521 521
522 // Maximize a docked window and check that it is maximized and no longer docked. 522 // Maximize a docked window and check that it is maximized and no longer docked.
523 TEST_P(DockedWindowResizerTest, AttachMaximize) { 523 TEST_P(DockedWindowResizerTest, AttachMaximize) {
524 if (!SupportsHostWindowResize()) 524 if (!SupportsHostWindowResize())
525 return; 525 return;
526 526
527 scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(0, 0, 201, 201))); 527 scoped_ptr<aura::Window> window(CreateTestWindow(gfx::Rect(0, 0, 201, 201)));
528 DragRelativeToEdge(DOCKED_EDGE_RIGHT, window.get(), 0); 528 DragRelativeToEdge(DOCKED_EDGE_RIGHT, window.get(), 0);
529 529
(...skipping 1087 matching lines...) Expand 10 before | Expand all | Expand 10 after
1617 EXPECT_TRUE(window_state->IsMaximized()); 1617 EXPECT_TRUE(window_state->IsMaximized());
1618 } 1618 }
1619 1619
1620 // Tests run twice - on both panels and normal windows 1620 // Tests run twice - on both panels and normal windows
1621 INSTANTIATE_TEST_CASE_P(NormalOrPanel, 1621 INSTANTIATE_TEST_CASE_P(NormalOrPanel,
1622 DockedWindowResizerTest, 1622 DockedWindowResizerTest,
1623 testing::Values(ui::wm::WINDOW_TYPE_NORMAL, 1623 testing::Values(ui::wm::WINDOW_TYPE_NORMAL,
1624 ui::wm::WINDOW_TYPE_PANEL)); 1624 ui::wm::WINDOW_TYPE_PANEL));
1625 } // namespace internal 1625 } // namespace internal
1626 } // namespace ash 1626 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/dock/docked_window_resizer.cc ('k') | ash/wm/drag_details.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698