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

Unified Diff: ui/views/views_test_suite.cc

Issue 2807833002: [views-mus] Prevent creating a native OzonePlatform in mus tests. (Closed)
Patch Set: sky comments Created 3 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
Index: ui/views/views_test_suite.cc
diff --git a/ui/views/views_test_suite.cc b/ui/views/views_test_suite.cc
index bd08ea3a7910577cb789699f1d28b386f24fdc50..82c406c5ea9dbf58440232eca06944368c6943df 100644
--- a/ui/views/views_test_suite.cc
+++ b/ui/views/views_test_suite.cc
@@ -53,16 +53,26 @@ void ViewsTestSuite::Initialize() {
ASSERT_TRUE(PathService::Get(ui::UI_TEST_PAK, &ui_test_pak_path));
ui::ResourceBundle::InitSharedInstanceWithPakPath(ui_test_pak_path);
#if defined(USE_AURA)
- env_ = aura::Env::CreateInstance();
+ InitializeEnv();
#endif
}
void ViewsTestSuite::Shutdown() {
#if defined(USE_AURA)
- env_.reset();
+ DestroyEnv();
#endif
ui::ResourceBundle::CleanupSharedInstance();
base::TestSuite::Shutdown();
}
+#if defined(USE_AURA)
+void ViewsTestSuite::InitializeEnv() {
+ env_ = aura::Env::CreateInstance();
+}
+
+void ViewsTestSuite::DestroyEnv() {
+ env_.reset();
+}
+#endif
+
} // namespace views
« ui/base/dragdrop/os_exchange_data_provider_factory.h ('K') | « ui/views/views_test_suite.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698