| OLD | NEW |
| 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 "chrome/browser/ui/ash/multi_user_window_manager.h" | 5 #include "chrome/browser/ui/ash/multi_user_window_manager.h" |
| 6 | 6 |
| 7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
| 8 #include "ash/test/ash_test_base.h" | 8 #include "ash/test/ash_test_base.h" |
| 9 #include "ash/test/test_shell_delegate.h" | 9 #include "ash/test/test_shell_delegate.h" |
| 10 #include "ash/wm/window_state.h" | 10 #include "ash/wm/window_state.h" |
| 11 #include "base/command_line.h" | 11 #include "base/command_line.h" |
| 12 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
| 13 #include "base/logging.h" | 13 #include "base/logging.h" |
| 14 #include "chrome/common/chrome_switches.h" | 14 #include "chrome/common/chrome_switches.h" |
| 15 #include "chrome/test/base/testing_profile.h" | 15 #include "chrome/test/base/testing_profile.h" |
| 16 #include "ui/aura/client/aura_constants.h" | 16 #include "ui/aura/client/aura_constants.h" |
| 17 #include "ui/aura/root_window.h" | 17 #include "ui/aura/root_window.h" |
| 18 #include "ui/base/ui_base_types.h" | 18 #include "ui/base/ui_base_types.h" |
| 19 | 19 |
| 20 namespace ash { | 20 namespace ash { |
| 21 namespace test { | 21 namespace test { |
| 22 | 22 |
| 23 // This many test windows will get created. | |
| 24 const int kNumberOfTestWindows = 5; | |
| 25 | |
| 26 // A test class for preparing the chrome::MultiUserWindowManager. It creates | 23 // A test class for preparing the chrome::MultiUserWindowManager. It creates |
| 27 // various windows and instantiates the chrome::MultiUserWindowManager. | 24 // various windows and instantiates the chrome::MultiUserWindowManager. |
| 28 class MultiUserWindowManagerTest : public AshTestBase { | 25 class MultiUserWindowManagerTest : public AshTestBase { |
| 29 public: | 26 public: |
| 30 MultiUserWindowManagerTest() : multi_user_window_manager_(NULL) {} | 27 MultiUserWindowManagerTest() : multi_user_window_manager_(NULL) {} |
| 31 | 28 |
| 32 virtual void SetUp() OVERRIDE; | 29 virtual void SetUp() OVERRIDE; |
| 33 virtual void TearDown() OVERRIDE; | 30 virtual void TearDown() OVERRIDE; |
| 34 | 31 |
| 35 protected: | 32 protected: |
| (...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 wm::GetWindowState(window(0))->Minimize(); | 353 wm::GetWindowState(window(0))->Minimize(); |
| 357 EXPECT_EQ("H[A]", GetStatus()); | 354 EXPECT_EQ("H[A]", GetStatus()); |
| 358 | 355 |
| 359 // Try to transfer the window to user B - which should get ignored. | 356 // Try to transfer the window to user B - which should get ignored. |
| 360 multi_user_window_manager()->ShowWindowForUser(window(0), "B"); | 357 multi_user_window_manager()->ShowWindowForUser(window(0), "B"); |
| 361 EXPECT_EQ("H[A]", GetStatus()); | 358 EXPECT_EQ("H[A]", GetStatus()); |
| 362 } | 359 } |
| 363 | 360 |
| 364 } // namespace test | 361 } // namespace test |
| 365 } // namespace ash | 362 } // namespace ash |
| OLD | NEW |