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

Unified Diff: trunk/src/chrome/test/base/browser_with_test_window_test.cc

Issue 286753002: Revert 270290 "Reduce creation of ViewsDelegate" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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
Index: trunk/src/chrome/test/base/browser_with_test_window_test.cc
===================================================================
--- trunk/src/chrome/test/base/browser_with_test_window_test.cc (revision 270304)
+++ trunk/src/chrome/test/base/browser_with_test_window_test.cc (working copy)
@@ -25,7 +25,6 @@
#if defined(USE_ASH)
#include "ash/test/ash_test_helper.h"
-#include "ash/test/ash_test_views_delegate.h"
#endif
#if defined(TOOLKIT_VIEWS)
@@ -60,8 +59,7 @@
#if defined(OS_CHROMEOS)
// TODO(jamescook): Windows Ash support. This will require refactoring
// AshTestHelper and AuraTestHelper so they can be used at the same time,
- // perhaps by AshTestHelper owning an AuraTestHelper. Also, need to cleanup
- // CreateViewsDelegate() below when cleanup done.
+ // perhaps by AshTestHelper owning an AuraTestHelper.
ash_test_helper_.reset(new ash::test::AshTestHelper(
base::MessageLoopForUI::current()));
ash_test_helper_->SetUp(true);
@@ -75,8 +73,9 @@
aura_test_helper_->SetUp();
new wm::DefaultActivationClient(aura_test_helper_->root_window());
#endif // USE_AURA
-#if !defined(OS_CHROMEOS) && defined(TOOLKIT_VIEWS)
+#if defined(TOOLKIT_VIEWS)
views_delegate_.reset(CreateViewsDelegate());
+ views::ViewsDelegate::views_delegate = views_delegate_.get();
#endif
// Subclasses can provide their own Profile.
@@ -114,6 +113,7 @@
base::MessageLoop::current()->Run();
#if defined(TOOLKIT_VIEWS)
+ views::ViewsDelegate::views_delegate = NULL;
views_delegate_.reset(NULL);
#endif
}
@@ -241,12 +241,8 @@
return new Browser(params);
}
-#if !defined(OS_CHROMEOS) && defined(TOOLKIT_VIEWS)
+#if defined(TOOLKIT_VIEWS)
views::ViewsDelegate* BrowserWithTestWindowTest::CreateViewsDelegate() {
-#if defined(USE_ASH)
- return new ash::test::AshTestViewsDelegate;
-#else
return new views::TestViewsDelegate;
-#endif
}
#endif
« no previous file with comments | « trunk/src/chrome/test/base/browser_with_test_window_test.h ('k') | trunk/src/ui/views/test/test_views_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698