Index: content/browser/frame_host/frame_tree_unittest.cc |
diff --git a/content/browser/frame_host/frame_tree_unittest.cc b/content/browser/frame_host/frame_tree_unittest.cc |
index abc16c97520cee98db893aec0e17d61c4fcc6288..ffb65477310dd3138e4fc2667e677a7c88358858 100644 |
--- a/content/browser/frame_host/frame_tree_unittest.cc |
+++ b/content/browser/frame_host/frame_tree_unittest.cc |
@@ -300,8 +300,8 @@ TEST_F(FrameTreeTest, FindFrames) { |
EXPECT_EQ(nullptr, frame_tree->FindByName("no such frame")); |
} |
-// Check that PreviousSibling() is retrieved correctly. |
-TEST_F(FrameTreeTest, PreviousSibling) { |
+// Check that PreviousSibling() and NextSibling() are retrieved correctly. |
+TEST_F(FrameTreeTest, GetSibling) { |
main_test_rfh()->InitializeRenderFrameIfNeeded(); |
// Add a few child frames to the main frame. |
@@ -326,11 +326,19 @@ TEST_F(FrameTreeTest, PreviousSibling) { |
blink::WebSandboxFlags::None, blink::WebFrameOwnerProperties()); |
FrameTreeNode* grandchild = child1->child_at(0); |
+ // Test PreviousSibling(). |
EXPECT_EQ(nullptr, root->PreviousSibling()); |
EXPECT_EQ(nullptr, child0->PreviousSibling()); |
EXPECT_EQ(child0, child1->PreviousSibling()); |
EXPECT_EQ(child1, child2->PreviousSibling()); |
EXPECT_EQ(nullptr, grandchild->PreviousSibling()); |
+ |
+ // Test NextSibling(). |
+ EXPECT_EQ(nullptr, root->NextSibling()); |
+ EXPECT_EQ(child1, child0->NextSibling()); |
+ EXPECT_EQ(child2, child1->NextSibling()); |
+ EXPECT_EQ(nullptr, child2->NextSibling()); |
+ EXPECT_EQ(nullptr, grandchild->NextSibling()); |
} |
// Do some simple manipulations of the frame tree, making sure that |