| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 path.Append(FILE_PATH_LITERAL("ash_test_resources_100_percent.pak")); | 65 path.Append(FILE_PATH_LITERAL("ash_test_resources_100_percent.pak")); |
| 66 base::FilePath ash_test_resources_200 = | 66 base::FilePath ash_test_resources_200 = |
| 67 path.Append(FILE_PATH_LITERAL("ash_test_resources_200_percent.pak")); | 67 path.Append(FILE_PATH_LITERAL("ash_test_resources_200_percent.pak")); |
| 68 | 68 |
| 69 ui::ResourceBundle::InitSharedInstanceWithPakPath(ash_test_strings); | 69 ui::ResourceBundle::InitSharedInstanceWithPakPath(ash_test_strings); |
| 70 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); | 70 ui::ResourceBundle& rb = ui::ResourceBundle::GetSharedInstance(); |
| 71 rb.AddDataPackFromPath(ash_test_resources_100, ui::SCALE_FACTOR_100P); | 71 rb.AddDataPackFromPath(ash_test_resources_100, ui::SCALE_FACTOR_100P); |
| 72 rb.AddDataPackFromPath(ash_test_resources_200, ui::SCALE_FACTOR_200P); | 72 rb.AddDataPackFromPath(ash_test_resources_200, ui::SCALE_FACTOR_200P); |
| 73 | 73 |
| 74 base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_); | 74 base::DiscardableMemoryAllocator::SetInstance(&discardable_memory_allocator_); |
| 75 aura::Env::CreateInstance(true); | 75 env_ = aura::Env::CreateInstance(); |
| 76 } | 76 } |
| 77 | 77 |
| 78 void AuraShellTestSuite::Shutdown() { | 78 void AuraShellTestSuite::Shutdown() { |
| 79 aura::Env::DeleteInstance(); | 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 |