| 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 "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 | 52 |
| 53 gfx::RegisterPathProvider(); | 53 gfx::RegisterPathProvider(); |
| 54 ui::RegisterPathProvider(); | 54 ui::RegisterPathProvider(); |
| 55 | 55 |
| 56 // Force unittests to run using en-US so if we test against string | 56 // Force unittests to run using en-US so if we test against string |
| 57 // output, it'll pass regardless of the system language. | 57 // output, it'll pass regardless of the system language. |
| 58 ui::ResourceBundle::InitSharedInstanceWithLocale( | 58 ui::ResourceBundle::InitSharedInstanceWithLocale( |
| 59 "en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); | 59 "en-US", NULL, ui::ResourceBundle::LOAD_COMMON_RESOURCES); |
| 60 | 60 |
| 61 base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_); | 61 base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_); |
| 62 aura::Env::CreateInstance(true); | 62 env_ = aura::Env::CreateInstance(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 void AuraShellTestSuite::Shutdown() { | 65 void AuraShellTestSuite::Shutdown() { |
| 66 aura::Env::DeleteInstance(); | 66 env_.reset(); |
| 67 ui::ResourceBundle::CleanupSharedInstance(); | 67 ui::ResourceBundle::CleanupSharedInstance(); |
| 68 #if defined(OS_WIN) | 68 #if defined(OS_WIN) |
| 69 com_initializer_.reset(); | 69 com_initializer_.reset(); |
| 70 #endif | 70 #endif |
| 71 base::TestSuite::Shutdown(); | 71 base::TestSuite::Shutdown(); |
| 72 } | 72 } |
| 73 | 73 |
| 74 } // namespace test | 74 } // namespace test |
| 75 } // namespace ash | 75 } // namespace ash |
| OLD | NEW |