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

Unified Diff: ui/views/mus/views_mus_test_suite.cc

Issue 2026623002: views/mus: Have explicit ownership of views::WindowManagerConnection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: tot-merge Created 4 years, 6 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 | « services/navigation/content_client/browser_main_parts.cc ('k') | ui/views/mus/window_manager_connection.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/mus/views_mus_test_suite.cc
diff --git a/ui/views/mus/views_mus_test_suite.cc b/ui/views/mus/views_mus_test_suite.cc
index aac10d9ea9d869fd436de00803d6c3d10392b4b7..142362b1d75edfaaf9fb22d77455f1234a44c5b5 100644
--- a/ui/views/mus/views_mus_test_suite.cc
+++ b/ui/views/mus/views_mus_test_suite.cc
@@ -46,11 +46,13 @@ class PlatformTestHelperMus : public PlatformTestHelper {
const shell::Identity& identity) {
// It is necessary to recreate the WindowManagerConnection for each test,
// since a new MessageLoop is created for each test.
- WindowManagerConnection::Create(connector, identity);
+ connection_ = WindowManagerConnection::Create(connector, identity);
}
- ~PlatformTestHelperMus() override { WindowManagerConnection::Reset(); }
+ ~PlatformTestHelperMus() override {}
private:
+ std::unique_ptr<WindowManagerConnection> connection_;
+
DISALLOW_COPY_AND_ASSIGN(PlatformTestHelperMus);
};
@@ -85,8 +87,6 @@ class ShellConnection {
}
~ShellConnection() {
- if (views::WindowManagerConnection::Exists())
- views::WindowManagerConnection::Reset();
base::WaitableEvent wait(base::WaitableEvent::ResetPolicy::AUTOMATIC,
base::WaitableEvent::InitialState::NOT_SIGNALED);
thread_.task_runner()->PostTask(
« no previous file with comments | « services/navigation/content_client/browser_main_parts.cc ('k') | ui/views/mus/window_manager_connection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698