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

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

Issue 1740303002: ozone/platform/wayland: Add WaylandTest base class to eliminate redundancy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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 "ui/ozone/platform/wayland/wayland_test.h"
6
7 namespace ui {
8
9 WaylandTest::WaylandTest()
10 : window(&delegate, &display, gfx::Rect(0, 0, 800, 600)) {}
11
12 WaylandTest::~WaylandTest() {}
13
14 void WaylandTest::SetUp() {
15 ASSERT_TRUE(server.Start());
16 ASSERT_TRUE(display.Initialize());
17 ASSERT_TRUE(window.Initialize());
18 wl_display_roundtrip(display.display());
19
20 server.Pause();
21
22 surface = server.GetObject<wl::MockSurface>(window.GetWidget());
23 ASSERT_TRUE(surface);
24 initialized = true;
25 }
26
27 void WaylandTest::TearDown() {
28 server.Resume();
29 if (initialized)
30 wl_display_roundtrip(display.display());
31 }
32
33 void WaylandTest::Sync() {
34 server.Resume();
35 wl_display_roundtrip(display.display());
36 server.Pause();
37 }
38
39 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/wayland/wayland_test.h ('k') | ui/ozone/platform/wayland/wayland_window_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698