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

Side by Side 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 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 #ifndef COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_TREE_CLIENT_PRIVATE_H_ 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_TREE_CLIENT_PRIVATE_H_
6 #define COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_TREE_CLIENT_PRIVATE_H_ 6 #define COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_TREE_CLIENT_PRIVATE_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 20 matching lines...) Expand all
31 ~WindowTreeClientPrivate(); 31 ~WindowTreeClientPrivate();
32 32
33 uint32_t event_observer_id(); 33 uint32_t event_observer_id();
34 34
35 // Calls OnEmbed() on the WindowTreeClient. 35 // Calls OnEmbed() on the WindowTreeClient.
36 void OnEmbed(mojom::WindowTree* window_tree); 36 void OnEmbed(mojom::WindowTree* window_tree);
37 37
38 // Pretends that |event| has been received from the window server. 38 // Pretends that |event| has been received from the window server.
39 void CallOnWindowInputEvent(Window* window, std::unique_ptr<ui::Event> event); 39 void CallOnWindowInputEvent(Window* window, std::unique_ptr<ui::Event> event);
40 40
41 // For tests which do not connect to the Mus Window Server, the stubbed
42 // connection does not respond to messages. This clears the in flight queue of
43 // requests so that tear down can occur.
44 void ClearInFlightQueue();
45
46 // For tests which do connect to the Mus Window Server. This runs until the
47 // |tree_client_impl_| has received acknowledgements for each message sent to
48 // the server.
49 void WaitForInFlightQueue();
50
41 private: 51 private:
42 WindowTreeClient* tree_client_impl_; 52 WindowTreeClient* tree_client_impl_;
43 53
44 DISALLOW_COPY_AND_ASSIGN(WindowTreeClientPrivate); 54 DISALLOW_COPY_AND_ASSIGN(WindowTreeClientPrivate);
45 }; 55 };
46 56
47 } // namespace mus 57 } // namespace mus
48 58
49 #endif // COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_TREE_CLIENT_PRIVATE_H_ 59 #endif // COMPONENTS_MUS_PUBLIC_CPP_TESTS_WINDOW_TREE_CLIENT_PRIVATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698