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

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

Issue 890293002: Fixing crash upon window manager creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed Created 5 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/notifications/message_center_notifications_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/shell.h" 5 #include "ash/shell.h"
6 #include "ash/test/ash_test_base.h" 6 #include "ash/test/ash_test_base.h"
7 #include "ash/test/test_session_state_delegate.h" 7 #include "ash/test/test_session_state_delegate.h"
8 #include "ash/test/test_shell_delegate.h" 8 #include "ash/test/test_shell_delegate.h"
9 #include "ash/wm/window_state.h" 9 #include "ash/wm/window_state.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 void WallpaperPrivateApiMultiUserUnittest::TearDown() { 216 void WallpaperPrivateApiMultiUserUnittest::TearDown() {
217 chrome::MultiUserWindowManager::DeleteInstance(); 217 chrome::MultiUserWindowManager::DeleteInstance();
218 AshTestBase::TearDown(); 218 AshTestBase::TearDown();
219 } 219 }
220 220
221 void WallpaperPrivateApiMultiUserUnittest::SetUpMultiUserWindowManager( 221 void WallpaperPrivateApiMultiUserUnittest::SetUpMultiUserWindowManager(
222 const std::string& active_user_id, 222 const std::string& active_user_id,
223 chrome::MultiUserWindowManager::MultiProfileMode mode) { 223 chrome::MultiUserWindowManager::MultiProfileMode mode) {
224 multi_user_window_manager_ = 224 multi_user_window_manager_ =
225 new chrome::MultiUserWindowManagerChromeOS(active_user_id); 225 new chrome::MultiUserWindowManagerChromeOS(active_user_id);
226 multi_user_window_manager_->Init();
226 chrome::MultiUserWindowManager::SetInstanceForTest( 227 chrome::MultiUserWindowManager::SetInstanceForTest(
227 multi_user_window_manager_, mode); 228 multi_user_window_manager_, mode);
228 // We do not want animations while the test is going on. 229 // We do not want animations while the test is going on.
229 multi_user_window_manager_->SetAnimationSpeedForTest( 230 multi_user_window_manager_->SetAnimationSpeedForTest(
230 chrome::MultiUserWindowManagerChromeOS::ANIMATION_SPEED_DISABLED); 231 chrome::MultiUserWindowManagerChromeOS::ANIMATION_SPEED_DISABLED);
231 EXPECT_TRUE(multi_user_window_manager_); 232 EXPECT_TRUE(multi_user_window_manager_);
232 } 233 }
233 234
234 void WallpaperPrivateApiMultiUserUnittest::SwitchActiveUser( 235 void WallpaperPrivateApiMultiUserUnittest::SwitchActiveUser(
235 const std::string& active_user_id) { 236 const std::string& active_user_id) {
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 scoped_refptr<TestRestoreFunction> restore_function_1( 393 scoped_refptr<TestRestoreFunction> restore_function_1(
393 new TestRestoreFunction()); 394 new TestRestoreFunction());
394 EXPECT_TRUE(restore_function_1->RunAsync()); 395 EXPECT_TRUE(restore_function_1->RunAsync());
395 396
396 EXPECT_FALSE(window1_state->IsMinimized()); 397 EXPECT_FALSE(window1_state->IsMinimized());
397 EXPECT_FALSE(window2_state->IsMinimized()); 398 EXPECT_FALSE(window2_state->IsMinimized());
398 EXPECT_FALSE(window3_state->IsMinimized()); 399 EXPECT_FALSE(window3_state->IsMinimized());
399 } 400 }
400 401
401 } // namespace chromeos 402 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/notifications/message_center_notifications_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698