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 #include "ash/test/test_suite.h" | 5 #include "ash/test/test_suite.h" |
6 | 6 |
7 #include "ash/common/ash_switches.h" | 7 #include "ash/common/ash_switches.h" |
8 #include "ash/test/ash_test_environment.h" | 8 #include "ash/test/ash_test_environment.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
(...skipping 19 matching lines...) Expand all Loading... | |
30 : TestSuite(argc, argv) {} | 30 : TestSuite(argc, argv) {} |
31 | 31 |
32 AuraShellTestSuite::~AuraShellTestSuite() {} | 32 AuraShellTestSuite::~AuraShellTestSuite() {} |
33 | 33 |
34 void AuraShellTestSuite::Initialize() { | 34 void AuraShellTestSuite::Initialize() { |
35 base::TestSuite::Initialize(); | 35 base::TestSuite::Initialize(); |
36 gl::GLSurfaceTestSupport::InitializeOneOff(); | 36 gl::GLSurfaceTestSupport::InitializeOneOff(); |
37 | 37 |
38 #if defined(OS_WIN) | 38 #if defined(OS_WIN) |
39 base::win::Version version = base::win::GetVersion(); | 39 base::win::Version version = base::win::GetVersion(); |
40 // Although Ash officially is only supported for users on Win7+, we still run | 40 // Although Ash officially is only supported for users on Win7+, we still run |
sky
2016/09/08 23:45:36
Nuke this comment and always create com_initialize
rjkroege
2016/09/09 00:04:21
Done.
| |
41 // ash_unittests on Vista builders, so we still need to initialize COM. | 41 // ash_unittests on Vista builders, so we still need to initialize COM. |
42 if (version >= base::win::VERSION_VISTA && | 42 if (version >= base::win::VERSION_VISTA) { |
43 !base::CommandLine::ForCurrentProcess()->HasSwitch( | |
44 ash::switches::kForceAshToDesktop)) { | |
45 com_initializer_.reset(new base::win::ScopedCOMInitializer()); | 43 com_initializer_.reset(new base::win::ScopedCOMInitializer()); |
46 ui::win::CreateATLModuleIfNeeded(); | 44 ui::win::CreateATLModuleIfNeeded(); |
47 } | 45 } |
48 #endif | 46 #endif |
49 | 47 |
50 gfx::RegisterPathProvider(); | 48 gfx::RegisterPathProvider(); |
51 ui::RegisterPathProvider(); | 49 ui::RegisterPathProvider(); |
52 | 50 |
53 // Force unittests to run using en-US so if we test against string output, | 51 // Force unittests to run using en-US so if we test against string output, |
54 // it'll pass regardless of the system language. | 52 // it'll pass regardless of the system language. |
(...skipping 27 matching lines...) Expand all Loading... | |
82 env_.reset(); | 80 env_.reset(); |
83 ui::ResourceBundle::CleanupSharedInstance(); | 81 ui::ResourceBundle::CleanupSharedInstance(); |
84 #if defined(OS_WIN) | 82 #if defined(OS_WIN) |
85 com_initializer_.reset(); | 83 com_initializer_.reset(); |
86 #endif | 84 #endif |
87 base::TestSuite::Shutdown(); | 85 base::TestSuite::Shutdown(); |
88 } | 86 } |
89 | 87 |
90 } // namespace test | 88 } // namespace test |
91 } // namespace ash | 89 } // namespace ash |
OLD | NEW |