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

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

Issue 2449073002: Makes DefaultCaptureClient work with a null root_window (Closed)
Patch Set: client:: 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..93d3ace2441de2a2bcf36853254f2b1aa8a68375 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>();
+ client::SetCaptureClient(host_->window(), capture_client_.get());
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