Commit fdf32b55 authored by carlosk's avatar carlosk Committed by Commit bot

Fixed test by changing the way a subframe was added.

Test NavigatorTestWithBrowserSideNavigation.BeginNavigation was broken
due to the way the subframe used was added to the tree. By directly
calling FrameTree::AddFrame the proper observer notifications were not
being executed and triggered a sanity check. It was replaced with the
already test-tailored TestRenderFrameHost::AppendChild.

BUG=455484

Review URL: https://codereview.chromium.org/904673004

Cr-Commit-Position: refs/heads/master@{#315063}
parent 9bf92547
......@@ -133,10 +133,7 @@ TEST_F(NavigatorTestWithBrowserSideNavigation, BeginNavigation) {
// Add a subframe.
FrameTreeNode* root_node = contents()->GetFrameTree()->root();
TestRenderFrameHost* subframe_rfh =
static_cast<TestRenderFrameHost*>(contents()->GetFrameTree()->AddFrame(
root_node, root_node->current_frame_host()->GetProcess()->GetID(), 14,
"Child"));
TestRenderFrameHost* subframe_rfh = main_test_rfh()->AppendChild("Child");
ASSERT_TRUE(subframe_rfh);
FrameTreeNode* subframe_node = subframe_rfh->frame_tree_node();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment