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

Unified Diff: chrome/test/base/view_event_test_platform_part_ash.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 | « ash/test/test_suite.cc ('k') | chrome/test/base/view_event_test_platform_part_chromeos.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/view_event_test_platform_part_ash.cc
diff --git a/chrome/test/base/view_event_test_platform_part_ash.cc b/chrome/test/base/view_event_test_platform_part_ash.cc
index 89f3c94c9a55aecf892c1aeeae5599eb55edc077..7ea2da1110a79691d0a9a8c3c53b3576b430559a 100644
--- a/chrome/test/base/view_event_test_platform_part_ash.cc
+++ b/chrome/test/base/view_event_test_platform_part_ash.cc
@@ -27,6 +27,7 @@ class ViewEventTestPlatformPartAsh : public ViewEventTestPlatformPart {
private:
scoped_ptr<gfx::Screen> screen_;
wm::WMState wm_state_;
+ scoped_ptr<aura::Env> env_;
DISALLOW_COPY_AND_ASSIGN(ViewEventTestPlatformPartAsh);
};
@@ -37,12 +38,12 @@ ViewEventTestPlatformPartAsh::ViewEventTestPlatformPartAsh(
// http://crbug.com/154081 use ash::Shell code path below on win_ash bots when
// interactive_ui_tests is brought up on that platform.
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, screen_.get());
- aura::Env::CreateInstance(true);
+ env_ = aura::Env::CreateInstance();
aura::Env::GetInstance()->set_context_factory(context_factory);
}
ViewEventTestPlatformPartAsh::~ViewEventTestPlatformPartAsh() {
- aura::Env::DeleteInstance();
+ env_.reset();
gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, nullptr);
}
« no previous file with comments | « ash/test/test_suite.cc ('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