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

Unified Diff: ui/ozone/platform/wayland/wayland_display_unittest.cc

Issue 2042503002: ozone/platform/wayland: Add support for wl_output_interface (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hide the use of the base::Closure 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 side-by-side diff with in-line comments
Download patch
Index: ui/ozone/platform/wayland/wayland_display_unittest.cc
diff --git a/ui/ozone/platform/wayland/wayland_display_unittest.cc b/ui/ozone/platform/wayland/wayland_display_unittest.cc
index 3b37154a689b7b922b10b51eb83326f4769bb29e..67e8d0591f700dc814a5f9c23f50d894e11bc793 100644
--- a/ui/ozone/platform/wayland/wayland_display_unittest.cc
+++ b/ui/ozone/platform/wayland/wayland_display_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_display.h"
+#include "ui/ozone/platform/wayland/wayland_screen.h"
namespace ui {
@@ -45,4 +46,26 @@ TEST(WaylandDisplayTest, Ping) {
server.Pause();
}
+TEST(WaylandDisplayTest, Output) {
+ base::MessageLoopForUI message_loop;
+ display::Display fake_display(1, gfx::Rect(0, 0, 800, 600));
+ wl::FakeServer server;
+ server.AddDisplay(fake_display);
+ ASSERT_TRUE(server.Start());
+ WaylandDisplay display;
+ ASSERT_TRUE(display.Initialize());
+ display.StartProcessingEvents();
+
+ display.PrimaryScreen()->WaitforOutputAvailable();
+
+ ASSERT_TRUE(display.GetScreenList().size() == 1);
+ WaylandScreen* screen = display.PrimaryScreen();
+ ASSERT_TRUE(screen->Geometry().width() == 800);
+ ASSERT_TRUE(screen->Geometry().height() == 600);
+
+ server.Resume();
+ base::RunLoop().RunUntilIdle();
+ server.Pause();
+}
+
} // namespace ui

Powered by Google App Engine
This is Rietveld 408576698