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

Side by Side Diff: ash/test/ash_test_helper.cc

Issue 14678004: cros: Enable new cras audio handler by default (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clang fix. Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « ash/system/chromeos/audio/tray_audio.cc ('k') | chrome/app/generated_resources.grd » ('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 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
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
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
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
OLDNEW
« no previous file with comments | « ash/system/chromeos/audio/tray_audio.cc ('k') | chrome/app/generated_resources.grd » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698