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

Side by Side Diff: components/exo/display_unittest.cc

Issue 1419373013: exo: Add support for subcompositor interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@exosphere-xdg-shell
Patch Set: rebase Created 5 years, 1 month 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
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "components/exo/buffer.h" 5 #include "components/exo/buffer.h"
6 #include "components/exo/display.h" 6 #include "components/exo/display.h"
7 #include "components/exo/shared_memory.h" 7 #include "components/exo/shared_memory.h"
8 #include "components/exo/shell_surface.h" 8 #include "components/exo/shell_surface.h"
9 #include "components/exo/sub_surface.h"
9 #include "components/exo/surface.h" 10 #include "components/exo/surface.h"
10 #include "components/exo/test/exo_test_base.h" 11 #include "components/exo/test/exo_test_base.h"
11 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
12 13
13 namespace exo { 14 namespace exo {
14 namespace { 15 namespace {
15 16
16 using DisplayTest = test::ExoTestBase; 17 using DisplayTest = test::ExoTestBase;
17 18
18 TEST_F(DisplayTest, CreateSurface) { 19 TEST_F(DisplayTest, CreateSurface) {
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 57
57 // Create a shell surface for surface1. 58 // Create a shell surface for surface1.
58 scoped_ptr<ShellSurface> shell_surface1 = 59 scoped_ptr<ShellSurface> shell_surface1 =
59 display->CreateShellSurface(surface1.get()); 60 display->CreateShellSurface(surface1.get());
60 61
61 // Create a shell surface for surface2. 62 // Create a shell surface for surface2.
62 scoped_ptr<ShellSurface> shell_surface2 = 63 scoped_ptr<ShellSurface> shell_surface2 =
63 display->CreateShellSurface(surface2.get()); 64 display->CreateShellSurface(surface2.get());
64 } 65 }
65 66
67 TEST_F(DisplayTest, CreateSubSurface) {
68 scoped_ptr<Display> display(new Display);
69
70 // Create two surfaces.
71 scoped_ptr<Surface> surface1 = display->CreateSurface();
72 EXPECT_TRUE(surface1);
73 scoped_ptr<Surface> surface2 = display->CreateSurface();
74 EXPECT_TRUE(surface2);
75
76 // Create a shell surface for surface1.
77 scoped_ptr<ShellSurface> shell_surface1 =
78 display->CreateShellSurface(surface1.get());
79
80 // Create a sub surface for surface2.
81 scoped_ptr<SubSurface> sub_surface1 =
82 display->CreateSubSurface(surface2.get(), surface1.get());
83 }
84
66 } // namespace 85 } // namespace
67 } // namespace exo 86 } // namespace exo
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698