| Index: components/exo/display_unittest.cc
|
| diff --git a/components/exo/display_unittest.cc b/components/exo/display_unittest.cc
|
| index 827452942f8920f2de70dfc9e648fc008dadb129..0f70d0ed393ffcea38fb5e7a54e6e2d64e9858fc 100644
|
| --- a/components/exo/display_unittest.cc
|
| +++ b/components/exo/display_unittest.cc
|
| @@ -6,6 +6,7 @@
|
| #include "components/exo/display.h"
|
| #include "components/exo/shared_memory.h"
|
| #include "components/exo/shell_surface.h"
|
| +#include "components/exo/sub_surface.h"
|
| #include "components/exo/surface.h"
|
| #include "components/exo/test/exo_test_base.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| @@ -63,5 +64,23 @@ TEST_F(DisplayTest, CreateShellSurface) {
|
| display->CreateShellSurface(surface2.get());
|
| }
|
|
|
| +TEST_F(DisplayTest, CreateSubSurface) {
|
| + scoped_ptr<Display> display(new Display);
|
| +
|
| + // Create two surfaces.
|
| + scoped_ptr<Surface> surface1 = display->CreateSurface();
|
| + EXPECT_TRUE(surface1);
|
| + scoped_ptr<Surface> surface2 = display->CreateSurface();
|
| + EXPECT_TRUE(surface2);
|
| +
|
| + // Create a shell surface for surface1.
|
| + scoped_ptr<ShellSurface> shell_surface1 =
|
| + display->CreateShellSurface(surface1.get());
|
| +
|
| + // Create a sub surface for surface2.
|
| + scoped_ptr<SubSurface> sub_surface1 =
|
| + display->CreateSubSurface(surface2.get(), surface1.get());
|
| +}
|
| +
|
| } // namespace
|
| } // namespace exo
|
|
|