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

Unified Diff: ash/shelf/shelf_layout_manager_unittest.cc

Issue 2985453003: fix shelf color with modal dialog. (Closed)
Patch Set: fix tests Created 3 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 | « no previous file | ash/wm/focus_rules.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_layout_manager_unittest.cc
diff --git a/ash/shelf/shelf_layout_manager_unittest.cc b/ash/shelf/shelf_layout_manager_unittest.cc
index 4d4d221e30bcbbe2446501fb4ee402cb289142bf..efd99055e085d88b09b3bf7d09b71bdc5bf76e33 100644
--- a/ash/shelf/shelf_layout_manager_unittest.cc
+++ b/ash/shelf/shelf_layout_manager_unittest.cc
@@ -56,6 +56,7 @@
#include "ui/keyboard/keyboard_util.h"
#include "ui/views/view.h"
#include "ui/views/widget/widget.h"
+#include "ui/wm/core/window_util.h"
namespace ash {
namespace {
@@ -1761,6 +1762,19 @@ TEST_F(ShelfLayoutManagerTest, ShelfBackgroundColor) {
w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
EXPECT_EQ(SHELF_BACKGROUND_MAXIMIZED, GetShelfWidget()->GetBackgroundType());
+
+ std::unique_ptr<aura::Window> w3(CreateTestWindow());
+ w3->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_WINDOW);
+ ::wm::AddTransientChild(w1.get(), w3.get());
+ w3->Show();
+ wm::ActivateWindow(w3.get());
+
+ wm::WorkspaceWindowState window_state =
+ RootWindowController::ForWindow(GetShelfWidget()->GetNativeWindow())
+ ->GetWorkspaceWindowState();
+ EXPECT_EQ(wm::WORKSPACE_WINDOW_STATE_MAXIMIZED, window_state);
+
+ w3.reset();
w1.reset();
EXPECT_EQ(SHELF_BACKGROUND_DEFAULT, GetShelfWidget()->GetBackgroundType());
}
« no previous file with comments | « no previous file | ash/wm/focus_rules.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698