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

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

Issue 1871253002: aura: Require explicit ownership of the Env instance. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot.merge Created 4 years, 8 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_chromeos.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 "base/i18n/rtl.h" 10 #include "base/i18n/rtl.h"
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
OLDNEW
« no previous file with comments | « ash/test/test_suite.h ('k') | chrome/test/base/view_event_test_platform_part_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698