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

Unified Diff: components/mus/public/cpp/tests/window_tree_client_private.h

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 side-by-side diff with in-line comments
Download patch
Index: components/mus/public/cpp/tests/window_tree_client_private.h
diff --git a/components/mus/public/cpp/tests/window_tree_client_private.h b/components/mus/public/cpp/tests/window_tree_client_private.h
index 7cec901b36071e80286c757c64ebedd12f2393cb..197fede774412085e6e14b41ba643577b111461b 100644
--- a/components/mus/public/cpp/tests/window_tree_client_private.h
+++ b/components/mus/public/cpp/tests/window_tree_client_private.h
@@ -38,6 +38,16 @@ class WindowTreeClientPrivate {
// Pretends that |event| has been received from the window server.
void CallOnWindowInputEvent(Window* window, std::unique_ptr<ui::Event> event);
+ // For tests which do not connect to the Mus Window Server, the stubbed
+ // connection does not respond to messages. This clears the in flight queue of
+ // requests so that tear down can occur.
+ void ClearInFlightQueue();
+
+ // For tests which do connect to the Mus Window Server. This runs until the
+ // |tree_client_impl_| has received acknowledgements for each message sent to
+ // the server.
+ void WaitForInFlightQueue();
+
private:
WindowTreeClient* tree_client_impl_;

Powered by Google App Engine
This is Rietveld 408576698