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

Unified Diff: components/exo/sub_surface_unittest.cc

Issue 2008153002: Add initial implementation of cc::Surfaces backend for exo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/exo/shell_surface_unittest.cc ('k') | components/exo/surface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/exo/sub_surface_unittest.cc
diff --git a/components/exo/sub_surface_unittest.cc b/components/exo/sub_surface_unittest.cc
index 6ada8b5e01327e5eb9415e01ae280da8a8a73827..e65dacd4fd6a6c18e36f9fe388dbf072807b87ca 100644
--- a/components/exo/sub_surface_unittest.cc
+++ b/components/exo/sub_surface_unittest.cc
@@ -13,9 +13,15 @@
namespace exo {
namespace {
-using SubSurfaceTest = test::ExoTestBase;
-
-TEST_F(SubSurfaceTest, SetPosition) {
+class SubSurfaceTest : public test::ExoTestBase,
+ public ::testing::WithParamInterface<bool> {
+ void SetUp() override {
+ Surface::SetUseSurfaceLayer(GetParam());
+ test::ExoTestBase::SetUp();
+ }
+};
+
+TEST_P(SubSurfaceTest, SetPosition) {
std::unique_ptr<Surface> parent(new Surface);
std::unique_ptr<Surface> surface(new Surface);
std::unique_ptr<SubSurface> sub_surface(
@@ -44,7 +50,7 @@ TEST_F(SubSurfaceTest, SetPosition) {
EXPECT_EQ(gfx::Point().ToString(), surface->bounds().origin().ToString());
}
-TEST_F(SubSurfaceTest, PlaceAbove) {
+TEST_P(SubSurfaceTest, PlaceAbove) {
std::unique_ptr<Surface> parent(new Surface);
std::unique_ptr<Surface> surface1(new Surface);
std::unique_ptr<Surface> surface2(new Surface);
@@ -75,7 +81,7 @@ TEST_F(SubSurfaceTest, PlaceAbove) {
EXPECT_EQ(surface1.get(), parent->children()[1]);
}
-TEST_F(SubSurfaceTest, PlaceBelow) {
+TEST_P(SubSurfaceTest, PlaceBelow) {
std::unique_ptr<Surface> parent(new Surface);
std::unique_ptr<Surface> surface1(new Surface);
std::unique_ptr<Surface> surface2(new Surface);
@@ -106,7 +112,7 @@ TEST_F(SubSurfaceTest, PlaceBelow) {
EXPECT_EQ(surface1.get(), parent->children()[1]);
}
-TEST_F(SubSurfaceTest, SetCommitBehavior) {
+TEST_P(SubSurfaceTest, SetCommitBehavior) {
std::unique_ptr<Surface> parent(new Surface);
std::unique_ptr<Surface> child(new Surface);
std::unique_ptr<Surface> grandchild(new Surface);
@@ -148,5 +154,7 @@ TEST_F(SubSurfaceTest, SetCommitBehavior) {
EXPECT_EQ(position2.ToString(), grandchild->bounds().origin().ToString());
}
+INSTANTIATE_TEST_CASE_P(, SubSurfaceTest, ::testing::Bool());
+
} // namespace
} // namespace exo
« no previous file with comments | « components/exo/shell_surface_unittest.cc ('k') | components/exo/surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698