OLD | NEW |
(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 |
OLD | NEW |