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

Unified Diff: ui/aura/test/aura_test_helper.cc

Issue 2449073002: Makes DefaultCaptureClient work with a null root_window (Closed)
Patch Set: DCHECK Created 4 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 | « ui/aura/client/default_capture_client.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura/test/aura_test_helper.cc
diff --git a/ui/aura/test/aura_test_helper.cc b/ui/aura/test/aura_test_helper.cc
index 933cb2f240fb44619c036d6cdc49df5a0f838d06..76766aa7a82f81a10e0475c8fc153abd213212d7 100644
--- a/ui/aura/test/aura_test_helper.cc
+++ b/ui/aura/test/aura_test_helper.cc
@@ -78,7 +78,8 @@ void AuraTestHelper::SetUp(ui::ContextFactory* context_factory) {
focus_client_.reset(new TestFocusClient);
client::SetFocusClient(root_window(), focus_client_.get());
parenting_client_.reset(new TestWindowParentingClient(root_window()));
- capture_client_.reset(new client::DefaultCaptureClient(root_window()));
+ capture_client_ = base::MakeUnique<client::DefaultCaptureClient>();
+ SetCaptureClient(host_->window(), capture_client_.get());
msw 2016/10/25 19:21:08 nit: client:: needed here like below?
msw 2016/10/25 19:21:08 aside: odd that host_->window()'s root is not root
sky 2016/10/25 19:44:40 Surprisingly it isn't needed here, but is needed b
msw 2016/10/25 19:47:59 Odd... I might add it to be clear/consistent, but
root_window()->Show();
// Ensure width != height so tests won't confuse them.
@@ -88,6 +89,7 @@ void AuraTestHelper::SetUp(ui::ContextFactory* context_factory) {
void AuraTestHelper::TearDown() {
teardown_called_ = true;
parenting_client_.reset();
+ client::SetCaptureClient(host_->window(), nullptr);
capture_client_.reset();
focus_client_.reset();
client::SetFocusClient(root_window(), nullptr);
« no previous file with comments | « ui/aura/client/default_capture_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698