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

Unified Diff: ash/shelf/shelf_layout_manager_unittest.cc

Issue 2967543003: collect windows from mru_list in workspace_controller. (Closed)
Patch Set: write down todo for test 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 | « ash/app_list/app_list_presenter_delegate_unittest.cc ('k') | ash/wm/workspace_controller.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 e6aa47ef75cb399adf426f2d89d9826724317d72..a65b0b6d214514da0967e1429bcbadbadd93b4eb 100644
--- a/ash/shelf/shelf_layout_manager_unittest.cc
+++ b/ash/shelf/shelf_layout_manager_unittest.cc
@@ -9,6 +9,7 @@
#include "ash/focus_cycler.h"
#include "ash/public/cpp/config.h"
#include "ash/public/cpp/shell_window_ids.h"
+#include "ash/root_window_controller.h"
#include "ash/session/session_controller.h"
#include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_constants.h"
@@ -1559,6 +1560,24 @@ TEST_F(ShelfLayoutManagerTest, AutohideShelfForAutohideWhenActiveWindow) {
->set_autohide_shelf_when_maximized_or_fullscreen(false);
widget_two->Activate();
EXPECT_EQ(SHELF_VISIBLE, shelf->GetVisibilityState());
+
+ wm::GetWindowState(window_two)
+ ->set_autohide_shelf_when_maximized_or_fullscreen(true);
+ window_two->SetProperty(aura::client::kAlwaysOnTopKey, true);
+
+ auto* shelf_window = shelf->GetWindow();
+ aura::Window* container = shelf_window->GetRootWindow()->GetChildById(
+ kShellWindowId_AlwaysOnTopContainer);
+ auto iter = std::find(container->children().begin(),
+ container->children().end(), window_two);
+ EXPECT_NE(iter, container->children().end());
+
+ widget_two->Maximize();
+ EXPECT_EQ(SHELF_AUTO_HIDE, shelf->GetVisibilityState());
+
+ wm::WorkspaceWindowState window_state =
+ RootWindowController::ForWindow(shelf_window)->GetWorkspaceWindowState();
+ EXPECT_EQ(wm::WORKSPACE_WINDOW_STATE_MAXIMIZED, window_state);
}
TEST_F(ShelfLayoutManagerTest, ShelfFlickerOnTrayActivation) {
« no previous file with comments | « ash/app_list/app_list_presenter_delegate_unittest.cc ('k') | ash/wm/workspace_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698