Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(39)

Side by Side Diff: ash/test/test_suite.cc

Issue 1293013002: aura: Require explicit ownership of the Env instance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/test/test_suite.h ('k') | chrome/test/base/view_event_test_platform_part_ash.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « ash/test/test_suite.h ('k') | chrome/test/base/view_event_test_platform_part_ash.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698