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

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

Issue 1742883002: ozone/platform/wayland: Drop WaylandWindow::GetWidget() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@wayland-test1
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
« no previous file with comments | « ui/ozone/platform/wayland/wayland_test.h ('k') | ui/ozone/platform/wayland/wayland_window.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/ozone/platform/wayland/wayland_test.h" 5 #include "ui/ozone/platform/wayland/wayland_test.h"
6 6
7 using ::testing::SaveArg;
8 using ::testing::_;
9
7 namespace ui { 10 namespace ui {
8 11
9 WaylandTest::WaylandTest() 12 WaylandTest::WaylandTest()
10 : window(&delegate, &display, gfx::Rect(0, 0, 800, 600)) {} 13 : window(&delegate, &display, gfx::Rect(0, 0, 800, 600)) {}
11 14
12 WaylandTest::~WaylandTest() {} 15 WaylandTest::~WaylandTest() {}
13 16
14 void WaylandTest::SetUp() { 17 void WaylandTest::SetUp() {
15 ASSERT_TRUE(server.Start()); 18 ASSERT_TRUE(server.Start());
16 ASSERT_TRUE(display.Initialize()); 19 ASSERT_TRUE(display.Initialize());
20 EXPECT_CALL(delegate, OnAcceleratedWidgetAvailable(_, _))
21 .WillOnce(SaveArg<0>(&widget));
17 ASSERT_TRUE(window.Initialize()); 22 ASSERT_TRUE(window.Initialize());
23 ASSERT_NE(widget, gfx::kNullAcceleratedWidget);
18 wl_display_roundtrip(display.display()); 24 wl_display_roundtrip(display.display());
19 25
20 server.Pause(); 26 server.Pause();
21 27
22 surface = server.GetObject<wl::MockSurface>(window.GetWidget()); 28 surface = server.GetObject<wl::MockSurface>(widget);
23 ASSERT_TRUE(surface); 29 ASSERT_TRUE(surface);
24 initialized = true; 30 initialized = true;
25 } 31 }
26 32
27 void WaylandTest::TearDown() { 33 void WaylandTest::TearDown() {
28 server.Resume(); 34 server.Resume();
29 if (initialized) 35 if (initialized)
30 wl_display_roundtrip(display.display()); 36 wl_display_roundtrip(display.display());
31 } 37 }
32 38
33 void WaylandTest::Sync() { 39 void WaylandTest::Sync() {
34 server.Resume(); 40 server.Resume();
35 wl_display_roundtrip(display.display()); 41 wl_display_roundtrip(display.display());
36 server.Pause(); 42 server.Pause();
37 } 43 }
38 44
39 } // namespace ui 45 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/platform/wayland/wayland_test.h ('k') | ui/ozone/platform/wayland/wayland_window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698