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/test/ash_test_environment.h" | 7 #include "ash/test/ash_test_environment.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" |
11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
12 #include "build/build_config.h" | 12 #include "build/build_config.h" |
13 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
14 #include "ui/aura/env.h" | 14 #include "ui/aura/env.h" |
15 #include "ui/base/resource/resource_bundle.h" | 15 #include "ui/base/resource/resource_bundle.h" |
16 #include "ui/base/ui_base_paths.h" | 16 #include "ui/base/ui_base_paths.h" |
17 #include "ui/gfx/gfx_paths.h" | 17 #include "ui/gfx/gfx_paths.h" |
18 #include "ui/gl/test/gl_surface_test_support.h" | 18 #include "ui/gl/test/gl_surface_test_support.h" |
| 19 #include "ui/message_center/message_center.h" |
19 | 20 |
20 #if defined(OS_WIN) | 21 #if defined(OS_WIN) |
21 #include "base/win/scoped_com_initializer.h" | 22 #include "base/win/scoped_com_initializer.h" |
22 #include "ui/base/win/atl_module.h" | 23 #include "ui/base/win/atl_module.h" |
23 #endif | 24 #endif |
24 | 25 |
25 namespace ash { | 26 namespace ash { |
26 namespace test { | 27 namespace test { |
27 | 28 |
28 AuraShellTestSuite::AuraShellTestSuite(int argc, char** argv) | 29 AuraShellTestSuite::AuraShellTestSuite(int argc, char** argv) |
29 : TestSuite(argc, argv) {} | 30 : TestSuite(argc, argv) {} |
30 | 31 |
31 AuraShellTestSuite::~AuraShellTestSuite() {} | 32 AuraShellTestSuite::~AuraShellTestSuite() {} |
32 | 33 |
33 void AuraShellTestSuite::Initialize() { | 34 void AuraShellTestSuite::Initialize() { |
34 base::TestSuite::Initialize(); | 35 base::TestSuite::Initialize(); |
35 gl::GLSurfaceTestSupport::InitializeOneOff(); | 36 gl::GLSurfaceTestSupport::InitializeOneOff(); |
| 37 message_center::MessageCenter::Initialize(); |
36 | 38 |
37 #if defined(OS_WIN) | 39 #if defined(OS_WIN) |
38 com_initializer_.reset(new base::win::ScopedCOMInitializer()); | 40 com_initializer_.reset(new base::win::ScopedCOMInitializer()); |
39 ui::win::CreateATLModuleIfNeeded(); | 41 ui::win::CreateATLModuleIfNeeded(); |
40 #endif | 42 #endif |
41 | 43 |
42 gfx::RegisterPathProvider(); | 44 gfx::RegisterPathProvider(); |
43 ui::RegisterPathProvider(); | 45 ui::RegisterPathProvider(); |
44 | 46 |
45 // Force unittests to run using en-US so if we test against string output, | 47 // Force unittests to run using en-US so if we test against string output, |
(...skipping 23 matching lines...) Expand all Loading... |
69 base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_); | 71 base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_); |
70 env_ = aura::Env::CreateInstance(); | 72 env_ = aura::Env::CreateInstance(); |
71 } | 73 } |
72 | 74 |
73 void AuraShellTestSuite::Shutdown() { | 75 void AuraShellTestSuite::Shutdown() { |
74 env_.reset(); | 76 env_.reset(); |
75 ui::ResourceBundle::CleanupSharedInstance(); | 77 ui::ResourceBundle::CleanupSharedInstance(); |
76 #if defined(OS_WIN) | 78 #if defined(OS_WIN) |
77 com_initializer_.reset(); | 79 com_initializer_.reset(); |
78 #endif | 80 #endif |
| 81 message_center::MessageCenter::Shutdown(); |
79 base::TestSuite::Shutdown(); | 82 base::TestSuite::Shutdown(); |
80 } | 83 } |
81 | 84 |
82 } // namespace test | 85 } // namespace test |
83 } // namespace ash | 86 } // namespace ash |
OLD | NEW |