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

Unified Diff: components/exo/sub_surface_unittest.cc

Issue 1490223002: exo: Use aura::Windows instead of views::Views as exo::Surfaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and update unit tests Created 5 years 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.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 8c3c2ff84d16650c786a33e11cba3b573a2b9c37..2d4ab5caf04e2f1d20c49986ebeff3878ccff1c4 100644
--- a/components/exo/sub_surface_unittest.cc
+++ b/components/exo/sub_surface_unittest.cc
@@ -44,9 +44,9 @@ TEST_F(SubSurfaceTest, PlaceAbove) {
scoped_ptr<SubSurface> sub_surface2(
new SubSurface(surface2.get(), parent.get()));
- ASSERT_EQ(2, parent->child_count());
- EXPECT_EQ(surface1.get(), parent->child_at(0));
- EXPECT_EQ(surface2.get(), parent->child_at(1));
+ ASSERT_EQ(2u, parent->children().size());
+ EXPECT_EQ(surface1.get(), parent->children()[0]);
+ EXPECT_EQ(surface2.get(), parent->children()[1]);
sub_surface2->PlaceAbove(parent.get());
sub_surface1->PlaceAbove(non_sibling_surface.get()); // Invalid
@@ -55,14 +55,14 @@ TEST_F(SubSurfaceTest, PlaceAbove) {
// Nothing should have changed as Commit() is required for new stacking
// order to take effect.
- EXPECT_EQ(surface1.get(), parent->child_at(0));
- EXPECT_EQ(surface2.get(), parent->child_at(1));
+ EXPECT_EQ(surface1.get(), parent->children()[0]);
+ EXPECT_EQ(surface2.get(), parent->children()[1]);
parent->Commit();
// surface1 should now be stacked above surface2.
- EXPECT_EQ(surface2.get(), parent->child_at(0));
- EXPECT_EQ(surface1.get(), parent->child_at(1));
+ EXPECT_EQ(surface2.get(), parent->children()[0]);
+ EXPECT_EQ(surface1.get(), parent->children()[1]);
}
TEST_F(SubSurfaceTest, PlaceBelow) {
@@ -75,9 +75,9 @@ TEST_F(SubSurfaceTest, PlaceBelow) {
scoped_ptr<SubSurface> sub_surface2(
new SubSurface(surface2.get(), parent.get()));
- ASSERT_EQ(2, parent->child_count());
- EXPECT_EQ(surface1.get(), parent->child_at(0));
- EXPECT_EQ(surface2.get(), parent->child_at(1));
+ ASSERT_EQ(2u, parent->children().size());
+ EXPECT_EQ(surface1.get(), parent->children()[0]);
+ EXPECT_EQ(surface2.get(), parent->children()[1]);
sub_surface2->PlaceBelow(parent.get()); // Invalid
sub_surface2->PlaceBelow(non_sibling_surface.get()); // Invalid
@@ -86,14 +86,14 @@ TEST_F(SubSurfaceTest, PlaceBelow) {
// Nothing should have changed as Commit() is required for new stacking
// order to take effect.
- EXPECT_EQ(surface1.get(), parent->child_at(0));
- EXPECT_EQ(surface2.get(), parent->child_at(1));
+ EXPECT_EQ(surface1.get(), parent->children()[0]);
+ EXPECT_EQ(surface2.get(), parent->children()[1]);
parent->Commit();
// surface1 should now be stacked above surface2.
- EXPECT_EQ(surface2.get(), parent->child_at(0));
- EXPECT_EQ(surface1.get(), parent->child_at(1));
+ EXPECT_EQ(surface2.get(), parent->children()[0]);
+ EXPECT_EQ(surface1.get(), parent->children()[1]);
}
TEST_F(SubSurfaceTest, SetCommitBehavior) {
« no previous file with comments | « components/exo/shell_surface.cc ('k') | components/exo/surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698