| Index: ui/ozone/platform/wayland/wayland_connection_unittest.cc
|
| diff --git a/ui/ozone/platform/wayland/wayland_connection_unittest.cc b/ui/ozone/platform/wayland/wayland_connection_unittest.cc
|
| index abeb8818a15d8281acb250d41b564600600f8cb7..bc430aeac12f79b2052f8856696e03c297fac5fa 100644
|
| --- a/ui/ozone/platform/wayland/wayland_connection_unittest.cc
|
| +++ b/ui/ozone/platform/wayland/wayland_connection_unittest.cc
|
| @@ -9,6 +9,7 @@
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "ui/ozone/platform/wayland/fake_server.h"
|
| #include "ui/ozone/platform/wayland/wayland_connection.h"
|
| +#include "ui/ozone/platform/wayland/wayland_output.h"
|
|
|
| namespace ui {
|
|
|
| @@ -45,4 +46,28 @@ TEST(WaylandConnectionTest, Ping) {
|
| server.Pause();
|
| }
|
|
|
| +TEST(WaylandConnectionTest, Output) {
|
| + base::MessageLoopForUI message_loop;
|
| + wl::FakeServer server;
|
| + ASSERT_TRUE(server.Start());
|
| + server.output()->SetRect(gfx::Rect(0, 0, 800, 600));
|
| + WaylandConnection connection;
|
| + ASSERT_TRUE(connection.Initialize());
|
| + connection.StartProcessingEvents();
|
| +
|
| + base::RunLoop run_loop;
|
| + WaylandOutput::Observer output_observer(run_loop.QuitClosure(),
|
| + connection.PrimaryOutput());
|
| + run_loop.Run();
|
| +
|
| + ASSERT_TRUE(connection.GetOutputList().size() == 1);
|
| + WaylandOutput* output = connection.PrimaryOutput();
|
| + ASSERT_TRUE(output->Geometry().width() == 800);
|
| + ASSERT_TRUE(output->Geometry().height() == 600);
|
| +
|
| + server.Resume();
|
| + base::RunLoop().RunUntilIdle();
|
| + server.Pause();
|
| +}
|
| +
|
| } // namespace ui
|
|
|