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

Side by Side Diff: ash/system/overview/overview_button_tray_unittest.cc

Issue 2111443002: mash: Migrate SessionStateDelegate access to WmShell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/system/overview/overview_button_tray.h" 5 #include "ash/system/overview/overview_button_tray.h"
6 6
7 #include "ash/common/ash_switches.h" 7 #include "ash/common/ash_switches.h"
8 #include "ash/common/login_status.h" 8 #include "ash/common/login_status.h"
9 #include "ash/common/shelf/shelf_types.h" 9 #include "ash/common/shelf/shelf_types.h"
10 #include "ash/common/wm/overview/window_selector_controller.h" 10 #include "ash/common/wm/overview/window_selector_controller.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 }; 67 };
68 68
69 void OverviewButtonTrayTest::SetUp() { 69 void OverviewButtonTrayTest::SetUp() {
70 base::CommandLine::ForCurrentProcess()->AppendSwitch( 70 base::CommandLine::ForCurrentProcess()->AppendSwitch(
71 switches::kAshUseFirstDisplayAsInternal); 71 switches::kAshUseFirstDisplayAsInternal);
72 AshTestBase::SetUp(); 72 AshTestBase::SetUp();
73 } 73 }
74 74
75 void OverviewButtonTrayTest::NotifySessionStateChanged() { 75 void OverviewButtonTrayTest::NotifySessionStateChanged() {
76 GetTray()->SessionStateChanged( 76 GetTray()->SessionStateChanged(
77 ash_test_helper()->GetTestSessionStateDelegate()->GetSessionState()); 77 test::AshTestHelper::GetTestSessionStateDelegate()->GetSessionState());
78 } 78 }
79 79
80 // Ensures that creation doesn't cause any crashes and adds the image icon. 80 // Ensures that creation doesn't cause any crashes and adds the image icon.
81 TEST_F(OverviewButtonTrayTest, BasicConstruction) { 81 TEST_F(OverviewButtonTrayTest, BasicConstruction) {
82 EXPECT_TRUE(GetImageView(GetTray()) != NULL); 82 EXPECT_TRUE(GetImageView(GetTray()) != NULL);
83 } 83 }
84 84
85 // Test that maximize mode toggle changes visibility. 85 // Test that maximize mode toggle changes visibility.
86 // OverviewButtonTray should only be visible when MaximizeMode is enabled. 86 // OverviewButtonTray should only be visible when MaximizeMode is enabled.
87 // By default the system should not have MaximizeMode enabled. 87 // By default the system should not have MaximizeMode enabled.
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 ->maximize_mode_controller() 270 ->maximize_mode_controller()
271 ->EnableMaximizeModeWindowManager(true); 271 ->EnableMaximizeModeWindowManager(true);
272 EXPECT_TRUE(GetTray()->visible()); 272 EXPECT_TRUE(GetTray()->visible());
273 Shell::GetInstance() 273 Shell::GetInstance()
274 ->maximize_mode_controller() 274 ->maximize_mode_controller()
275 ->EnableMaximizeModeWindowManager(false); 275 ->EnableMaximizeModeWindowManager(false);
276 EXPECT_FALSE(GetTray()->visible()); 276 EXPECT_FALSE(GetTray()->visible());
277 } 277 }
278 278
279 } // namespace ash 279 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698