| 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 #ifndef ASH_TEST_ASH_TEST_BASE_H_ | 5 #ifndef ASH_TEST_ASH_TEST_BASE_H_ |
| 6 #define ASH_TEST_ASH_TEST_BASE_H_ | 6 #define ASH_TEST_ASH_TEST_BASE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/at_exit.h" |
| 10 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 11 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 12 #include "base/threading/thread.h" | 13 #include "base/threading/thread.h" |
| 13 #include "content/public/test/test_browser_thread_bundle.h" | 14 #include "content/public/test/test_browser_thread_bundle.h" |
| 14 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 15 #include "third_party/skia/include/core/SkColor.h" | 16 #include "third_party/skia/include/core/SkColor.h" |
| 16 #include "ui/wm/public/window_types.h" | 17 #include "ui/wm/public/window_types.h" |
| 17 | 18 |
| 18 #if defined(OS_WIN) | 19 #if defined(OS_WIN) |
| 19 #include "ui/base/win/scoped_ole_initializer.h" | 20 #include "ui/base/win/scoped_ole_initializer.h" |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 void SetCanLockScreen(bool can_lock_screen); | 120 void SetCanLockScreen(bool can_lock_screen); |
| 120 void SetShouldLockScreenBeforeSuspending(bool should_lock); | 121 void SetShouldLockScreenBeforeSuspending(bool should_lock); |
| 121 void SetUserAddingScreenRunning(bool user_adding_screen_running); | 122 void SetUserAddingScreenRunning(bool user_adding_screen_running); |
| 122 | 123 |
| 123 // Methods to emulate blocking and unblocking user session with given | 124 // Methods to emulate blocking and unblocking user session with given |
| 124 // |block_reason|. | 125 // |block_reason|. |
| 125 void BlockUserSession(UserSessionBlockReason block_reason); | 126 void BlockUserSession(UserSessionBlockReason block_reason); |
| 126 void UnblockUserSession(); | 127 void UnblockUserSession(); |
| 127 | 128 |
| 128 private: | 129 private: |
| 130 base::ShadowingAtExitManager at_exit_; |
| 129 bool setup_called_; | 131 bool setup_called_; |
| 130 bool teardown_called_; | 132 bool teardown_called_; |
| 131 // |SetUp()| doesn't activate session if this is set to false. | 133 // |SetUp()| doesn't activate session if this is set to false. |
| 132 bool start_session_; | 134 bool start_session_; |
| 133 scoped_ptr<content::TestBrowserThreadBundle> thread_bundle_; | 135 scoped_ptr<content::TestBrowserThreadBundle> thread_bundle_; |
| 134 scoped_ptr<AshTestHelper> ash_test_helper_; | 136 scoped_ptr<AshTestHelper> ash_test_helper_; |
| 135 scoped_ptr<aura::test::EventGenerator> event_generator_; | 137 scoped_ptr<aura::test::EventGenerator> event_generator_; |
| 136 #if defined(OS_WIN) | 138 #if defined(OS_WIN) |
| 137 // Note that the order is important here as ipc_thread_ should be destroyed | 139 // Note that the order is important here as ipc_thread_ should be destroyed |
| 138 // after metro_viewer_host_->channel_. | 140 // after metro_viewer_host_->channel_. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 152 virtual ~NoSessionAshTestBase() {} | 154 virtual ~NoSessionAshTestBase() {} |
| 153 | 155 |
| 154 private: | 156 private: |
| 155 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); | 157 DISALLOW_COPY_AND_ASSIGN(NoSessionAshTestBase); |
| 156 }; | 158 }; |
| 157 | 159 |
| 158 } // namespace test | 160 } // namespace test |
| 159 } // namespace ash | 161 } // namespace ash |
| 160 | 162 |
| 161 #endif // ASH_TEST_ASH_TEST_BASE_H_ | 163 #endif // ASH_TEST_ASH_TEST_BASE_H_ |
| OLD | NEW |