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

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

Issue 658383003: Componentize Constrained Window Views (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: rebase Created 6 years, 2 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/chrome_tests_unit.gypi ('k') | components/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/base/browser_with_test_window_test.cc
diff --git a/chrome/test/base/browser_with_test_window_test.cc b/chrome/test/base/browser_with_test_window_test.cc
index 324b596d07de99ecbdd06e2572cdf2a116860ac0..3eda95473b09763c10e68a462ef78e51ea095cf9 100644
--- a/chrome/test/base/browser_with_test_window_test.cc
+++ b/chrome/test/base/browser_with_test_window_test.cc
@@ -30,6 +30,8 @@
#endif
#if defined(TOOLKIT_VIEWS)
+#include "chrome/browser/ui/views/chrome_constrained_window_views_client.h"
+#include "components/constrained_window/constrained_window_views.h"
#include "ui/views/test/test_views_delegate.h"
#endif
@@ -77,9 +79,13 @@ void BrowserWithTestWindowTest::SetUp() {
aura_test_helper_->SetUp(context_factory);
new wm::DefaultActivationClient(aura_test_helper_->root_window());
#endif // USE_AURA
-#if !defined(OS_CHROMEOS) && defined(TOOLKIT_VIEWS)
+
+#if defined(TOOLKIT_VIEWS)
+#if !defined(OS_CHROMEOS)
views_delegate_.reset(CreateViewsDelegate());
-#endif
+#endif // !OS_CHROMEOS
+ SetConstrainedWindowViewsClient(CreateChromeConstrainedWindowViewsClient());
+#endif // TOOLKIT_VIEWS
// Subclasses can provide their own Profile.
profile_ = CreateProfile();
@@ -116,6 +122,7 @@ void BrowserWithTestWindowTest::TearDown() {
base::MessageLoop::current()->Run();
#if defined(TOOLKIT_VIEWS)
+ SetConstrainedWindowViewsClient(scoped_ptr<ConstrainedWindowViewsClient>());
sky 2014/10/24 18:04:22 I think there was a conversion from nullptr->scope
oshima 2014/10/24 20:36:47 Hmm, it didn't work. ../../chrome/test/base/brows
blundell 2014/10/27 06:54:44 I think the idea is that you now can do SetConstra
views_delegate_.reset(NULL);
#endif
}
« no previous file with comments | « chrome/chrome_tests_unit.gypi ('k') | components/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698