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

Unified Diff: ui/views/run_all_unittests.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/views/examples/examples_main.cc ('k') | ui/views_content_client/views_content_client_main_parts_aura.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/run_all_unittests.cc
diff --git a/ui/views/run_all_unittests.cc b/ui/views/run_all_unittests.cc
index 6983bd64bffcb748acbbf6e542b269deaa5f8f33..3330e5756a7886a4f22363c25ed83881b5066676 100644
--- a/ui/views/run_all_unittests.cc
+++ b/ui/views/run_all_unittests.cc
@@ -31,19 +31,22 @@ class ViewTestSuite : public base::TestSuite {
ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
#if defined(USE_AURA)
- aura::Env::CreateInstance(true);
+ env_ = aura::Env::CreateInstance();
#endif
}
void Shutdown() override {
#if defined(USE_AURA)
- aura::Env::DeleteInstance();
+ env_.reset();
#endif
ui::ResourceBundle::CleanupSharedInstance();
base::TestSuite::Shutdown();
}
private:
+#if defined(USE_AURA)
+ scoped_ptr<aura::Env> env_;
+#endif
DISALLOW_COPY_AND_ASSIGN(ViewTestSuite);
};
« no previous file with comments | « ui/views/examples/examples_main.cc ('k') | ui/views_content_client/views_content_client_main_parts_aura.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698