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

Unified Diff: ui/aura/test/run_all_unittests.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/aura/test/aura_test_helper.cc ('k') | ui/views/examples/examples_main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test/run_all_unittests.cc
diff --git a/ui/aura/test/run_all_unittests.cc b/ui/aura/test/run_all_unittests.cc
index 0e7ff20c6958efa3a4f4d258b2b8be554fbbcc3e..1e6de4aa5ff6f3bddcebd903a96af15227a0db45 100644
--- a/ui/aura/test/run_all_unittests.cc
+++ b/ui/aura/test/run_all_unittests.cc
@@ -18,15 +18,16 @@ class AuraTestSuite : public base::TestSuite {
void Initialize() override {
base::TestSuite::Initialize();
gfx::GLSurfaceTestSupport::InitializeOneOff();
- aura::Env::CreateInstance(true);
+ env_ = aura::Env::CreateInstance();
}
void Shutdown() override {
- aura::Env::DeleteInstance();
+ env_.reset();
base::TestSuite::Shutdown();
}
private:
+ std::unique_ptr<aura::Env> env_;
DISALLOW_COPY_AND_ASSIGN(AuraTestSuite);
};
« no previous file with comments | « ui/aura/test/aura_test_helper.cc ('k') | ui/views/examples/examples_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698