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

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

Issue 2761373002: Move yet more from WmShell to Shell (Closed)
Patch Set: merge Created 3 years, 9 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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/common/wm/workspace_controller.h" 5 #include "ash/common/wm/workspace_controller.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "ash/common/session/session_controller.h" 9 #include "ash/common/session/session_controller.h"
10 #include "ash/common/shelf/shelf_layout_manager.h" 10 #include "ash/common/shelf/shelf_layout_manager.h"
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 EXPECT_TRUE(GetWindowOverlapsShelf()); 493 EXPECT_TRUE(GetWindowOverlapsShelf());
494 } 494 }
495 495
496 // Verifies going from maximized to minimized sets the right state for painting 496 // Verifies going from maximized to minimized sets the right state for painting
497 // the background of the launcher. 497 // the background of the launcher.
498 TEST_F(WorkspaceControllerTest, MinimizeResetsVisibility) { 498 TEST_F(WorkspaceControllerTest, MinimizeResetsVisibility) {
499 // TODO(bruthig|xiyuan): Move SessionState setup into AshTestBase or 499 // TODO(bruthig|xiyuan): Move SessionState setup into AshTestBase or
500 // AshTestHelper. 500 // AshTestHelper.
501 mojom::SessionInfoPtr info = mojom::SessionInfo::New(); 501 mojom::SessionInfoPtr info = mojom::SessionInfo::New();
502 info->state = session_manager::SessionState::ACTIVE; 502 info->state = session_manager::SessionState::ACTIVE;
503 ash::WmShell::Get()->session_controller()->SetSessionInfo(std::move(info)); 503 ash::Shell::Get()->session_controller()->SetSessionInfo(std::move(info));
504 504
505 std::unique_ptr<Window> w1(CreateTestWindow()); 505 std::unique_ptr<Window> w1(CreateTestWindow());
506 w1->Show(); 506 w1->Show();
507 wm::ActivateWindow(w1.get()); 507 wm::ActivateWindow(w1.get());
508 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED); 508 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
509 EXPECT_EQ(SHELF_BACKGROUND_MAXIMIZED, shelf_widget()->GetBackgroundType()); 509 EXPECT_EQ(SHELF_BACKGROUND_MAXIMIZED, shelf_widget()->GetBackgroundType());
510 510
511 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED); 511 w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MINIMIZED);
512 EXPECT_EQ(SHELF_VISIBLE, GetPrimaryShelf()->GetVisibilityState()); 512 EXPECT_EQ(SHELF_VISIBLE, GetPrimaryShelf()->GetVisibilityState());
513 EXPECT_EQ(SHELF_BACKGROUND_DEFAULT, shelf_widget()->GetBackgroundType()); 513 EXPECT_EQ(SHELF_BACKGROUND_DEFAULT, shelf_widget()->GetBackgroundType());
(...skipping 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
1538 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, 0)); 1538 ui::PointerDetails(ui::EventPointerType::POINTER_TYPE_TOUCH, 0));
1539 ui::EventTarget* target = targeter->FindTargetForEvent(root, &touch); 1539 ui::EventTarget* target = targeter->FindTargetForEvent(root, &touch);
1540 if (points[i].is_target_hit) 1540 if (points[i].is_target_hit)
1541 EXPECT_EQ(window.get(), target); 1541 EXPECT_EQ(window.get(), target);
1542 else 1542 else
1543 EXPECT_NE(window.get(), target); 1543 EXPECT_NE(window.get(), target);
1544 } 1544 }
1545 } 1545 }
1546 1546
1547 } // namespace ash 1547 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/window_cycle_controller_unittest.cc ('k') | chrome/browser/chromeos/arc/arc_play_store_enabled_preference_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698