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/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/i18n/rtl.h" | 10 #include "base/i18n/rtl.h" |
(...skipping 16 matching lines...) Expand all Loading... |
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 | 31 |
32 AuraShellTestSuite::~AuraShellTestSuite() { | 32 AuraShellTestSuite::~AuraShellTestSuite() { |
33 } | 33 } |
34 | 34 |
35 void AuraShellTestSuite::Initialize() { | 35 void AuraShellTestSuite::Initialize() { |
36 base::TestSuite::Initialize(); | 36 base::TestSuite::Initialize(); |
37 gfx::GLSurfaceTestSupport::InitializeOneOff(); | 37 gl::GLSurfaceTestSupport::InitializeOneOff(); |
38 | 38 |
39 #if defined(OS_WIN) | 39 #if defined(OS_WIN) |
40 base::win::Version version = base::win::GetVersion(); | 40 base::win::Version version = base::win::GetVersion(); |
41 // Although Ash officially is only supported for users on Win7+, we still run | 41 // Although Ash officially is only supported for users on Win7+, we still run |
42 // ash_unittests on Vista builders, so we still need to initialize COM. | 42 // ash_unittests on Vista builders, so we still need to initialize COM. |
43 if (version >= base::win::VERSION_VISTA && | 43 if (version >= base::win::VERSION_VISTA && |
44 !base::CommandLine::ForCurrentProcess()->HasSwitch( | 44 !base::CommandLine::ForCurrentProcess()->HasSwitch( |
45 ash::switches::kForceAshToDesktop)) { | 45 ash::switches::kForceAshToDesktop)) { |
46 com_initializer_.reset(new base::win::ScopedCOMInitializer()); | 46 com_initializer_.reset(new base::win::ScopedCOMInitializer()); |
47 ui::win::CreateATLModuleIfNeeded(); | 47 ui::win::CreateATLModuleIfNeeded(); |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 env_.reset(); | 79 env_.reset(); |
80 ui::ResourceBundle::CleanupSharedInstance(); | 80 ui::ResourceBundle::CleanupSharedInstance(); |
81 #if defined(OS_WIN) | 81 #if defined(OS_WIN) |
82 com_initializer_.reset(); | 82 com_initializer_.reset(); |
83 #endif | 83 #endif |
84 base::TestSuite::Shutdown(); | 84 base::TestSuite::Shutdown(); |
85 } | 85 } |
86 | 86 |
87 } // namespace test | 87 } // namespace test |
88 } // namespace ash | 88 } // namespace ash |
OLD | NEW |