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

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

Issue 178883004: Enable the volume slider in Ash for windows. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix COM initialization errors (the right way). Created 6 years, 9 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/test/ash_test_helper_unittest.cc ('k') | chrome/test/base/in_process_browser_test.cc » ('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 (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/test/test_suite.h" 5 #include "ash/test/test_suite.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 15 matching lines...) Expand all
26 namespace test { 26 namespace test {
27 27
28 AuraShellTestSuite::AuraShellTestSuite(int argc, char** argv) 28 AuraShellTestSuite::AuraShellTestSuite(int argc, char** argv)
29 : TestSuite(argc, argv) {} 29 : TestSuite(argc, argv) {}
30 30
31 void AuraShellTestSuite::Initialize() { 31 void AuraShellTestSuite::Initialize() {
32 base::TestSuite::Initialize(); 32 base::TestSuite::Initialize();
33 gfx::GLSurface::InitializeOneOffForTests(true); 33 gfx::GLSurface::InitializeOneOffForTests(true);
34 34
35 #if defined(OS_WIN) 35 #if defined(OS_WIN)
36 if (base::win::GetVersion() >= base::win::VERSION_WIN8 && 36 base::win::Version version = base::win::GetVersion();
37 if (version >= base::win::VERSION_WIN7 &&
37 !CommandLine::ForCurrentProcess()->HasSwitch( 38 !CommandLine::ForCurrentProcess()->HasSwitch(
38 ash::switches::kForceAshToDesktop)) { 39 ash::switches::kForceAshToDesktop)) {
39 com_initializer_.reset(new base::win::ScopedCOMInitializer()); 40 com_initializer_.reset(new base::win::ScopedCOMInitializer());
40 ui::win::CreateATLModuleIfNeeded(); 41 ui::win::CreateATLModuleIfNeeded();
41 ASSERT_TRUE(win8::MakeTestDefaultBrowserSynchronously()); 42 if (version >= base::win::VERSION_WIN8)
43 ASSERT_TRUE(win8::MakeTestDefaultBrowserSynchronously());
42 } 44 }
43 #endif 45 #endif
44 46
45 gfx::RegisterPathProvider(); 47 gfx::RegisterPathProvider();
46 ui::RegisterPathProvider(); 48 ui::RegisterPathProvider();
47 49
48 // Force unittests to run using en-US so if we test against string 50 // Force unittests to run using en-US so if we test against string
49 // output, it'll pass regardless of the system language. 51 // output, it'll pass regardless of the system language.
50 ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL); 52 ui::ResourceBundle::InitSharedInstanceWithLocale("en-US", NULL);
51 } 53 }
52 54
53 void AuraShellTestSuite::Shutdown() { 55 void AuraShellTestSuite::Shutdown() {
54 ui::ResourceBundle::CleanupSharedInstance(); 56 ui::ResourceBundle::CleanupSharedInstance();
55 #if defined(OS_WIN) 57 #if defined(OS_WIN)
56 com_initializer_.reset(); 58 com_initializer_.reset();
57 #endif 59 #endif
58 base::TestSuite::Shutdown(); 60 base::TestSuite::Shutdown();
59 } 61 }
60 62
61 } // namespace test 63 } // namespace test
62 } // namespace ash 64 } // namespace ash
OLDNEW
« no previous file with comments | « ash/test/ash_test_helper_unittest.cc ('k') | chrome/test/base/in_process_browser_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698