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 "ash/test/ash_test_helper.h" | 5 #include "ash/test/ash_test_helper.h" |
6 | 6 |
7 #include "ash/ash_switches.h" | 7 #include "ash/ash_switches.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/test/display_manager_test_api.h" | 9 #include "ash/test/display_manager_test_api.h" |
10 #include "ash/test/shell_test_api.h" | 10 #include "ash/test/shell_test_api.h" |
(...skipping 27 matching lines...) Expand all Loading... | |
38 AshTestHelper::AshTestHelper(base::MessageLoopForUI* message_loop) | 38 AshTestHelper::AshTestHelper(base::MessageLoopForUI* message_loop) |
39 : message_loop_(message_loop), | 39 : message_loop_(message_loop), |
40 test_shell_delegate_(NULL) { | 40 test_shell_delegate_(NULL) { |
41 CHECK(message_loop_); | 41 CHECK(message_loop_); |
42 } | 42 } |
43 | 43 |
44 AshTestHelper::~AshTestHelper() { | 44 AshTestHelper::~AshTestHelper() { |
45 } | 45 } |
46 | 46 |
47 void AshTestHelper::SetUp() { | 47 void AshTestHelper::SetUp() { |
48 // TODO(jennyz): Create mock or test AudioHandler so we can instantiate | |
49 // an ash::Shell with the new CrasAudioHandler. crbug.com/233266 | |
James Cook
2013/04/30 20:55:05
Can you use chromeos::CrasAudioHandler::Initialize
rkc
2013/04/30 23:04:57
Discussed offline.
| |
50 CommandLine::ForCurrentProcess()->AppendSwitch( | |
51 ash::switches::kAshDisableNewAudioHandler); | |
48 // TODO(jamescook): Can we do this without changing command line? | 52 // TODO(jamescook): Can we do this without changing command line? |
49 // Use the origin (1,1) so that it doesn't over | 53 // Use the origin (1,1) so that it doesn't over |
50 // lap with the native mouse cursor. | 54 // lap with the native mouse cursor. |
51 CommandLine::ForCurrentProcess()->AppendSwitchASCII( | 55 CommandLine::ForCurrentProcess()->AppendSwitchASCII( |
52 switches::kAshHostWindowBounds, "1+1-800x600"); | 56 switches::kAshHostWindowBounds, "1+1-800x600"); |
53 #if defined(OS_WIN) | 57 #if defined(OS_WIN) |
54 aura::test::SetUsePopupAsRootWindowForTest(true); | 58 aura::test::SetUsePopupAsRootWindowForTest(true); |
55 if (base::win::IsTSFAwareRequired()) | 59 if (base::win::IsTSFAwareRequired()) |
56 ui::TSFBridge::Initialize(); | 60 ui::TSFBridge::Initialize(); |
57 #endif | 61 #endif |
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
143 aura::RootWindow* AshTestHelper::CurrentContext() { | 147 aura::RootWindow* AshTestHelper::CurrentContext() { |
144 aura::RootWindow* root_window = Shell::GetActiveRootWindow(); | 148 aura::RootWindow* root_window = Shell::GetActiveRootWindow(); |
145 if (!root_window) | 149 if (!root_window) |
146 root_window = Shell::GetPrimaryRootWindow(); | 150 root_window = Shell::GetPrimaryRootWindow(); |
147 DCHECK(root_window); | 151 DCHECK(root_window); |
148 return root_window; | 152 return root_window; |
149 } | 153 } |
150 | 154 |
151 } // namespace test | 155 } // namespace test |
152 } // namespace ash | 156 } // namespace ash |
OLD | NEW |