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

Unified Diff: ash/common/test/ash_test_impl.h

Issue 2374893002: Adds AshTest (Closed)
Patch Set: real feedback Created 4 years, 3 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: ash/common/test/ash_test_impl.h
diff --git a/ash/common/test/ash_test_impl.h b/ash/common/test/ash_test_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..0b5cf69973ddfa2cb2a8c1abf2ae9e401a943e29
--- /dev/null
+++ b/ash/common/test/ash_test_impl.h
@@ -0,0 +1,54 @@
+// 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 ASH_COMMON_TEST_ASH_TEST_IMPL_H_
+#define ASH_COMMON_TEST_ASH_TEST_IMPL_H_
+
+#include <memory>
+#include <string>
+
+#include "ui/display/manager/display_layout.h"
+#include "ui/views/widget/widget.h"
+#include "ui/wm/public/window_types.h"
+
+namespace display {
+class Display;
+}
+
+namespace gfx {
+class Rect;
+}
+
+namespace ash {
+
+class WindowOwner;
+class WmWindow;
+
+// Provides the real implementation of AshTest, see it for details.
+class AshTestImpl {
+ public:
+ virtual ~AshTestImpl() {}
+
+ // Factory function for creating AshTestImpl. Implemention that is used
+ // depends upon build dependencies.
+ static std::unique_ptr<AshTestImpl> Create();
+
+ // These functions mirror that of AshTest, see it for details.
+ virtual void SetUp() = 0;
+ virtual void TearDown() = 0;
+ virtual bool SupportsMultipleDisplays() const = 0;
+ virtual void UpdateDisplay(const std::string& display_spec) = 0;
+ virtual std::unique_ptr<WindowOwner> CreateTestWindow(
+ const gfx::Rect& bounds_in_screen,
+ ui::wm::WindowType type,
+ int shell_window_id) = 0;
+ virtual display::Display GetSecondaryDisplay() = 0;
+ virtual bool SetSecondaryDisplayPlacement(
+ display::DisplayPlacement::Position position,
+ int offset) = 0;
+};
+
+} // namespace ash
+
+#endif // ASH_COMMON_TEST_ASH_TEST_IMPL_H_
« ash/common/test/ash_test.h ('K') | « ash/common/test/ash_test.cc ('k') | ash/mus/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698