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

Side by Side Diff: chrome/browser/chromeos/extensions/wallpaper_private_api_unittest.cc

Issue 2661283002: cros: Clean up SessionStateDelegate refs in Chrome (Closed)
Patch Set: update browser_finder_chromeos_unittest 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/chromeos/extensions/wallpaper_private_api.h" 5 #include "chrome/browser/chromeos/extensions/wallpaper_private_api.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "ash/common/wm/window_state.h" 9 #include "ash/common/wm/window_state.h"
10 #include "ash/test/ash_test_base.h" 10 #include "ash/test/ash_test_base.h"
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
213 multi_user_window_manager_, mode); 213 multi_user_window_manager_, mode);
214 // We do not want animations while the test is going on. 214 // We do not want animations while the test is going on.
215 multi_user_window_manager_->SetAnimationSpeedForTest( 215 multi_user_window_manager_->SetAnimationSpeedForTest(
216 chrome::MultiUserWindowManagerChromeOS::ANIMATION_SPEED_DISABLED); 216 chrome::MultiUserWindowManagerChromeOS::ANIMATION_SPEED_DISABLED);
217 EXPECT_TRUE(multi_user_window_manager_); 217 EXPECT_TRUE(multi_user_window_manager_);
218 } 218 }
219 219
220 void WallpaperPrivateApiMultiUserUnittest::SwitchActiveUser( 220 void WallpaperPrivateApiMultiUserUnittest::SwitchActiveUser(
221 const AccountId& active_account_id) { 221 const AccountId& active_account_id) {
222 fake_user_manager()->SwitchActiveUser(active_account_id); 222 fake_user_manager()->SwitchActiveUser(active_account_id);
223 multi_user_window_manager_->ActiveUserChanged(active_account_id); 223 multi_user_window_manager_->ActiveUserChanged(
224 fake_user_manager()->FindUser(active_account_id));
224 } 225 }
225 226
226 // In multi profile mode, user may open wallpaper picker in one profile and 227 // In multi profile mode, user may open wallpaper picker in one profile and
227 // then switch to a different profile and open another wallpaper picker 228 // then switch to a different profile and open another wallpaper picker
228 // without closing the first one. 229 // without closing the first one.
229 TEST_F(WallpaperPrivateApiMultiUserUnittest, HideAndRestoreWindowsTwoUsers) { 230 TEST_F(WallpaperPrivateApiMultiUserUnittest, HideAndRestoreWindowsTwoUsers) {
230 SetUpMultiUserWindowManager( 231 SetUpMultiUserWindowManager(
231 test_account_id1_, 232 test_account_id1_,
232 chrome::MultiUserWindowManager::MULTI_PROFILE_MODE_SEPARATED); 233 chrome::MultiUserWindowManager::MULTI_PROFILE_MODE_SEPARATED);
233 234
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
369 // Then we destroy window 0 and call the restore function. 370 // Then we destroy window 0 and call the restore function.
370 window0.reset(); 371 window0.reset();
371 EXPECT_TRUE(RunRestoreFunction()); 372 EXPECT_TRUE(RunRestoreFunction());
372 373
373 EXPECT_FALSE(window1_state->IsMinimized()); 374 EXPECT_FALSE(window1_state->IsMinimized());
374 EXPECT_FALSE(window2_state->IsMinimized()); 375 EXPECT_FALSE(window2_state->IsMinimized());
375 EXPECT_FALSE(window3_state->IsMinimized()); 376 EXPECT_FALSE(window3_state->IsMinimized());
376 } 377 }
377 378
378 } // namespace chromeos 379 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698