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

Side by Side Diff: ui/ozone/platform/wayland/wayland_display_unittest.cc

Issue 2147523003: Rename WaylandDisplay to WaylandConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add argument name Created 4 years, 5 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include <wayland-server-core.h>
6 #include <xdg-shell-unstable-v5-server-protocol.h>
7
8 #include "base/run_loop.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10 #include "ui/ozone/platform/wayland/fake_server.h"
11 #include "ui/ozone/platform/wayland/wayland_display.h"
12
13 namespace ui {
14
15 TEST(WaylandDisplayTest, UseUnstableVersion) {
16 base::MessageLoopForUI message_loop;
17 wl::FakeServer server;
18 EXPECT_CALL(*server.xdg_shell(),
19 UseUnstableVersion(XDG_SHELL_VERSION_CURRENT));
20 ASSERT_TRUE(server.Start());
21 WaylandDisplay display;
22 ASSERT_TRUE(display.Initialize());
23 display.StartProcessingEvents();
24
25 base::RunLoop().RunUntilIdle();
26 server.Pause();
27 }
28
29 TEST(WaylandDisplayTest, Ping) {
30 base::MessageLoopForUI message_loop;
31 wl::FakeServer server;
32 ASSERT_TRUE(server.Start());
33 WaylandDisplay display;
34 ASSERT_TRUE(display.Initialize());
35 display.StartProcessingEvents();
36
37 base::RunLoop().RunUntilIdle();
38 server.Pause();
39
40 xdg_shell_send_ping(server.xdg_shell()->resource(), 1234);
41 EXPECT_CALL(*server.xdg_shell(), Pong(1234));
42
43 server.Resume();
44 base::RunLoop().RunUntilIdle();
45 server.Pause();
46 }
47
48 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/wayland/wayland_display.cc ('k') | ui/ozone/platform/wayland/wayland_pointer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698