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

Unified Diff: mash/wm/test/wm_test_helper.h

Issue 1994763002: Wires up WorkspaceLayoutManager in mash (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: data deps Created 4 years, 7 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 | « mash/wm/test/wm_test_base.cc ('k') | mash/wm/test/wm_test_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mash/wm/test/wm_test_helper.h
diff --git a/mash/wm/test/wm_test_helper.h b/mash/wm/test/wm_test_helper.h
new file mode 100644
index 0000000000000000000000000000000000000000..601f5b12f9bd964cadab68fdf19f7f51f53c0902
--- /dev/null
+++ b/mash/wm/test/wm_test_helper.h
@@ -0,0 +1,58 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef MASH_WM_TEST_WM_TEST_HELPER_H_
+#define MASH_WM_TEST_WM_TEST_HELPER_H_
+
+#include <memory>
+
+#include "base/macros.h"
+#include "components/mus/public/cpp/tests/test_window_tree_connection_setup.h"
+#include "mash/wm/window_manager_application.h"
+
+namespace base {
+class MessageLoop;
+}
+
+namespace gfx {
+class Rect;
+}
+
+namespace mus {
+class Window;
+}
+
+namespace mash {
+namespace wm {
+
+class WmTestScreen;
+
+// WMTestHelper is responsible for configuring a WindowTreeConnection that
+// does not talk to mus. Additionally a test Screen (WmTestScreen) is created.
+class WmTestHelper {
+ public:
+ WmTestHelper();
+ ~WmTestHelper();
+
+ void Init();
+
+ WindowManagerApplication* window_manager_app() {
+ return &window_manager_app_;
+ }
+
+ WmTestScreen* screen() { return screen_; }
+
+ private:
+ std::unique_ptr<base::MessageLoop> message_loop_;
+ mus::TestWindowTreeConnectionSetup window_tree_connection_setup_;
+ WindowManagerApplication window_manager_app_;
+ WmTestScreen* screen_ = nullptr; // Owned by |window_manager_app_|.
+
+ DISALLOW_COPY_AND_ASSIGN(WmTestHelper);
+};
+
+} // namespace wm
+} // namespace mash
+
+#endif // MASH_WM_TEST_WM_TEST_HELPER_H_
« no previous file with comments | « mash/wm/test/wm_test_base.cc ('k') | mash/wm/test/wm_test_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698