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

Unified Diff: ui/views/test/test_views_delegate.cc

Issue 280863002: Reduce creation of ViewsDelegate (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add widget includes for undef CreateWindow Created 6 years, 7 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 | « chrome/test/base/browser_with_test_window_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/test/test_views_delegate.cc
diff --git a/ui/views/test/test_views_delegate.cc b/ui/views/test/test_views_delegate.cc
index d68eb3fa5c6dd8114178d4d765d30dca9a08a947..b507f517d1d559a69f81f8e2162085f9371f9ce1 100644
--- a/ui/views/test/test_views_delegate.cc
+++ b/ui/views/test/test_views_delegate.cc
@@ -17,7 +17,8 @@ TestViewsDelegate::TestViewsDelegate()
}
TestViewsDelegate::~TestViewsDelegate() {
- ViewsDelegate::views_delegate = NULL;
+ if (ViewsDelegate::views_delegate == this)
+ ViewsDelegate::views_delegate = NULL;
}
void TestViewsDelegate::SetUseTransparentWindows(bool transparent) {
« no previous file with comments | « chrome/test/base/browser_with_test_window_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698