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

Unified 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 side-by-side diff with in-line comments
Download patch
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

Powered by Google App Engine
This is Rietveld 408576698