| Index: ui/ozone/platform/wayland/fake_server.h
|
| diff --git a/ui/ozone/platform/wayland/fake_server.h b/ui/ozone/platform/wayland/fake_server.h
|
| index 499d84f436392484008ba7f86090ac799f258f20..aee287127ac1c238ad2179d54b12b28d89696f73 100644
|
| --- a/ui/ozone/platform/wayland/fake_server.h
|
| +++ b/ui/ozone/platform/wayland/fake_server.h
|
| @@ -12,6 +12,7 @@
|
| #include "base/synchronization/waitable_event.h"
|
| #include "base/threading/thread.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
| +#include "ui/display/display.h"
|
|
|
| struct wl_client;
|
| struct wl_display;
|
| @@ -127,6 +128,19 @@ class MockCompositor : public Global {
|
| DISALLOW_COPY_AND_ASSIGN(MockCompositor);
|
| };
|
|
|
| +class MockOutput : public Global {
|
| + public:
|
| + MockOutput();
|
| + ~MockOutput() override;
|
| + void SetDisplay(const display::Display& display) { fake_display_ = display; }
|
| + const display::Display& Display() { return fake_display_; }
|
| +
|
| + private:
|
| + display::Display fake_display_;
|
| +
|
| + DISALLOW_COPY_AND_ASSIGN(MockOutput);
|
| +};
|
| +
|
| class MockSeat : public Global {
|
| public:
|
| MockSeat();
|
| @@ -172,6 +186,8 @@ class FakeServer : public base::Thread, base::MessagePumpLibevent::Watcher {
|
| // Resume the server after flushing client connections.
|
| void Resume();
|
|
|
| + void AddDisplay(const display::Display&);
|
| +
|
| template <typename T>
|
| T* GetObject(uint32_t id) {
|
| wl_resource* resource = wl_client_get_object(client_, id);
|
| @@ -199,6 +215,7 @@ class FakeServer : public base::Thread, base::MessagePumpLibevent::Watcher {
|
| bool paused_ = false;
|
|
|
| MockCompositor compositor_;
|
| + MockOutput output_;
|
| MockSeat seat_;
|
| MockXdgShell xdg_shell_;
|
|
|
|
|