OLD | NEW |
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" |
11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
12 #include "chrome/browser/chromeos/extensions/wallpaper_private_api.h" | 12 #include "chrome/browser/chromeos/extensions/wallpaper_private_api.h" |
13 #include "chrome/browser/chromeos/login/users/fake_user_manager.h" | 13 #include "chrome/browser/chromeos/login/users/fake_user_manager.h" |
14 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" | 14 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" |
15 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h" | 15 #include "chrome/browser/ui/ash/multi_user/multi_user_window_manager_chromeos.h" |
16 #include "chrome/common/chrome_switches.h" | |
17 #include "ui/aura/test/test_windows.h" | 16 #include "ui/aura/test/test_windows.h" |
18 #include "ui/aura/window.h" | 17 #include "ui/aura/window.h" |
19 #include "ui/aura/window_event_dispatcher.h" | 18 #include "ui/aura/window_event_dispatcher.h" |
20 | 19 |
21 //#include "base/compiler_specific.h" | 20 //#include "base/compiler_specific.h" |
22 //#include "base/logging.h" | 21 //#include "base/logging.h" |
23 //#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" | 22 //#include "chrome/browser/ui/ash/multi_user/multi_user_window_manager.h" |
24 namespace chromeos { | 23 namespace chromeos { |
25 namespace { | 24 namespace { |
26 | 25 |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 } | 200 } |
202 | 201 |
203 private: | 202 private: |
204 chrome::MultiUserWindowManagerChromeOS* multi_user_window_manager_; | 203 chrome::MultiUserWindowManagerChromeOS* multi_user_window_manager_; |
205 ash::test::TestSessionStateDelegate* session_state_delegate_; | 204 ash::test::TestSessionStateDelegate* session_state_delegate_; |
206 | 205 |
207 DISALLOW_COPY_AND_ASSIGN(WallpaperPrivateApiMultiUserUnittest); | 206 DISALLOW_COPY_AND_ASSIGN(WallpaperPrivateApiMultiUserUnittest); |
208 }; | 207 }; |
209 | 208 |
210 void WallpaperPrivateApiMultiUserUnittest::SetUp() { | 209 void WallpaperPrivateApiMultiUserUnittest::SetUp() { |
211 CommandLine::ForCurrentProcess()->AppendSwitch(switches::kMultiProfiles); | |
212 AshTestBase::SetUp(); | 210 AshTestBase::SetUp(); |
213 session_state_delegate_ = | 211 session_state_delegate_ = |
214 static_cast<ash::test::TestSessionStateDelegate*> ( | 212 static_cast<ash::test::TestSessionStateDelegate*> ( |
215 ash::Shell::GetInstance()->session_state_delegate()); | 213 ash::Shell::GetInstance()->session_state_delegate()); |
216 fake_user_manager()->AddUser(kTestAccount1); | 214 fake_user_manager()->AddUser(kTestAccount1); |
217 fake_user_manager()->AddUser(kTestAccount2); | 215 fake_user_manager()->AddUser(kTestAccount2); |
218 } | 216 } |
219 | 217 |
220 void WallpaperPrivateApiMultiUserUnittest::TearDown() { | 218 void WallpaperPrivateApiMultiUserUnittest::TearDown() { |
221 chrome::MultiUserWindowManager::DeleteInstance(); | 219 chrome::MultiUserWindowManager::DeleteInstance(); |
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 scoped_refptr<TestRestoreFunction> restore_function_1( | 394 scoped_refptr<TestRestoreFunction> restore_function_1( |
397 new TestRestoreFunction()); | 395 new TestRestoreFunction()); |
398 EXPECT_TRUE(restore_function_1->RunAsync()); | 396 EXPECT_TRUE(restore_function_1->RunAsync()); |
399 | 397 |
400 EXPECT_FALSE(window1_state->IsMinimized()); | 398 EXPECT_FALSE(window1_state->IsMinimized()); |
401 EXPECT_FALSE(window2_state->IsMinimized()); | 399 EXPECT_FALSE(window2_state->IsMinimized()); |
402 EXPECT_FALSE(window3_state->IsMinimized()); | 400 EXPECT_FALSE(window3_state->IsMinimized()); |
403 } | 401 } |
404 | 402 |
405 } // namespace chromeos | 403 } // namespace chromeos |
OLD | NEW |