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

Side by Side Diff: components/mus/public/cpp/tests/test_window_tree_client_setup.cc

Issue 2029743002: Check WindowTreeClient for empty inflight queue upon teardown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More tests 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 unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/mus/public/cpp/tests/test_window_tree_client_setup.h" 5 #include "components/mus/public/cpp/tests/test_window_tree_client_setup.h"
6 6
7 #include "components/mus/public/cpp/tests/test_window_tree.h" 7 #include "components/mus/public/cpp/tests/test_window_tree.h"
8 #include "components/mus/public/cpp/tests/window_tree_client_private.h" 8 #include "components/mus/public/cpp/tests/window_tree_client_private.h"
9 #include "components/mus/public/cpp/window_tree_client.h" 9 #include "components/mus/public/cpp/window_tree_client.h"
10 10
(...skipping 19 matching lines...) Expand all
30 WindowTreeClientPrivate(window_tree_client_.get()) 30 WindowTreeClientPrivate(window_tree_client_.get())
31 .OnEmbed(window_tree_.get()); 31 .OnEmbed(window_tree_.get());
32 } 32 }
33 33
34 WindowTreeClient* TestWindowTreeClientSetup::window_tree_client() { 34 WindowTreeClient* TestWindowTreeClientSetup::window_tree_client() {
35 return window_tree_client_.get(); 35 return window_tree_client_.get();
36 } 36 }
37 37
38 void TestWindowTreeClientSetup::OnWillDestroyClient( 38 void TestWindowTreeClientSetup::OnWillDestroyClient(
39 mus::WindowTreeClient* client) { 39 mus::WindowTreeClient* client) {
40 // |window_tree_| stubs out the connection to the Mus Window Server. So we
41 // need to clear the client queue before tear down.
42 WindowTreeClientPrivate(window_tree_client_.get()).ClearInFlightQueue();
40 // See comment in header as to why we do this. 43 // See comment in header as to why we do this.
41 window_tree_client_.release(); 44 window_tree_client_.release();
42 } 45 }
43 46
44 } // namespace mus 47 } // namespace mus
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698