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

Unified Diff: ash/wm/workspace/workspace_manager_unittest.cc

Issue 18637004: Sets the background color of shelf is opaque black when maximized (2nd) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: remove log Created 7 years, 5 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/wm/workspace/workspace_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/workspace/workspace_manager_unittest.cc
diff --git a/ash/wm/workspace/workspace_manager_unittest.cc b/ash/wm/workspace/workspace_manager_unittest.cc
index 60e3fdfbf825eb0380094aa54d0a050823f1334d..9b1a6fa3828025a61644baf069b3b23bad533554 100644
--- a/ash/wm/workspace/workspace_manager_unittest.cc
+++ b/ash/wm/workspace/workspace_manager_unittest.cc
@@ -144,13 +144,6 @@ class WorkspaceManagerTest : public test::AshTestBase {
return shelf_layout_manager()->window_overlaps_shelf();
}
- bool IsBackgroundVisible(aura::Window* window) {
- RootWindowController* controller = RootWindowController::ForWindow(window);
- aura::Window* background =
- controller->GetContainer(kShellWindowId_DesktopBackgroundContainer);
- return background->IsVisible();
- }
-
Workspace* FindBy(aura::Window* window) const {
return manager_->FindBy(window);
}
@@ -306,46 +299,6 @@ TEST_F(WorkspaceManagerTest, CloseLastWindowInWorkspace) {
EXPECT_TRUE(w1->IsVisible());
}
-TEST_F(WorkspaceManagerTest, BackgroundWithMaximizedWindow) {
- scoped_ptr<Window> w1(CreateTestWindow());
- scoped_ptr<Window> w2(CreateTestWindow());
- scoped_ptr<Window> w3(CreateTestWindow());
- w1->SetBounds(gfx::Rect(0, 0, 250, 251));
- w1->Show();
- w2->SetBounds(gfx::Rect(0, 0, 250, 251));
- w2->Show();
- w3->SetBounds(gfx::Rect(0, 0, 250, 251));
- w3->Show();
- wm::ActivateWindow(w1.get());
- wm::ActivateWindow(w2.get());
- wm::ActivateWindow(w3.get());
- EXPECT_TRUE(IsBackgroundVisible(w1.get()));
-
- w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- EXPECT_FALSE(IsBackgroundVisible(w1.get()));
-
- w3->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- EXPECT_FALSE(IsBackgroundVisible(w1.get()));
-
- w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
- EXPECT_FALSE(IsBackgroundVisible(w1.get()));
-
- w3->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
- EXPECT_TRUE(IsBackgroundVisible(w1.get()));
-
- w2->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- EXPECT_FALSE(IsBackgroundVisible(w1.get()));
-
- w3->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
- EXPECT_FALSE(IsBackgroundVisible(w1.get()));
-
- w2.reset();
- EXPECT_FALSE(IsBackgroundVisible(w1.get()));
-
- w3.reset();
- EXPECT_TRUE(IsBackgroundVisible(w1.get()));
-}
-
// Assertions around adding a fullscreen window when empty.
TEST_F(WorkspaceManagerTest, AddFullscreenWindowWhenEmpty) {
scoped_ptr<Window> w1(CreateTestWindow());
@@ -1043,10 +996,12 @@ TEST_F(WorkspaceManagerTest, MinimizeResetsVisibility) {
w1->Show();
wm::ActivateWindow(w1.get());
w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
+ EXPECT_EQ(SHELF_BACKGROUND_MAXIMIZED, shelf_widget()->GetBackgroundType());
+
w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
EXPECT_EQ(SHELF_VISIBLE,
shelf_layout_manager()->visibility_state());
- EXPECT_FALSE(shelf_widget()->paints_background());
+ EXPECT_EQ(SHELF_BACKGROUND_DEFAULT, shelf_widget()->GetBackgroundType());
}
// Verifies transients are moved when fullscreen.
« no previous file with comments | « ash/wm/workspace/workspace_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698