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

Unified Diff: ui/wm/test/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
Index: ui/wm/test/run_all_unittests.cc
diff --git a/ui/wm/test/run_all_unittests.cc b/ui/wm/test/run_all_unittests.cc
index 970da37dce37f81b465ae984d3dd47394541bf0b..94af206d17c93823d779b4366882656ae9e27e69 100644
--- a/ui/wm/test/run_all_unittests.cc
+++ b/ui/wm/test/run_all_unittests.cc
@@ -9,6 +9,7 @@
#include "base/test/launcher/unit_test_launcher.h"
#include "base/test/test_suite.h"
#include "testing/gtest/include/gtest/gtest.h"
+#include "ui/aura/env.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
#include "ui/gl/test/gl_surface_test_support.h"
@@ -26,14 +27,18 @@ class WMTestSuite : public base::TestSuite {
base::FilePath ui_test_pak_path;
ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
+
+ env_ = aura::Env::CreateInstance();
}
void Shutdown() override {
+ env_.reset();
ui::ResourceBundle::CleanupSharedInstance();
base::TestSuite::Shutdown();
}
private:
+ scoped_ptr<aura::Env> env_;
DISALLOW_COPY_AND_ASSIGN(WMTestSuite);
};
« no previous file with comments | « ui/views_content_client/views_content_client_main_parts_desktop_aura.cc ('k') | ui/wm/test/wm_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698