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

Unified Diff: content/browser/frame_host/navigation_controller_impl_browsertest.cc

Issue 2742333002: Remove ScopedVector from content/browser/ [1]. (Closed)
Patch Set: Created 3 years, 9 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
Index: content/browser/frame_host/navigation_controller_impl_browsertest.cc
diff --git a/content/browser/frame_host/navigation_controller_impl_browsertest.cc b/content/browser/frame_host/navigation_controller_impl_browsertest.cc
index bf41fac607ab3451905b4528f659ddd6fd682370..8a72f02671832f3b3df2d70e6064033e99561055 100644
--- a/content/browser/frame_host/navigation_controller_impl_browsertest.cc
+++ b/content/browser/frame_host/navigation_controller_impl_browsertest.cc
@@ -5988,11 +5988,9 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
EXPECT_EQ(1U, nav_entry->root_node()->children.size());
- NavigationEntryImpl::TreeNode* tree_node =
- nav_entry->root_node()->children[0];
- EXPECT_EQ(1U, tree_node->children.size());
+ EXPECT_EQ(1U, nav_entry->root_node()->children[0]->children.size());
- tree_node = tree_node->children[0];
+ const auto& tree_node = nav_entry->root_node()->children[0]->children[0];
EXPECT_EQ(0U, tree_node->children.size());
EXPECT_EQ("foo-frame-name", tree_node->frame_entry->frame_unique_name());
@@ -6008,7 +6006,6 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
WebContentsImpl* web_contents =
static_cast<WebContentsImpl*>(shell()->web_contents());
FrameTreeNode* root = web_contents->GetFrameTree()->root();
- NavigationEntryImpl::TreeNode* tree_node = nullptr;
GURL start_url(embedded_test_server()->GetURL("/title1.html"));
EXPECT_TRUE(NavigateToURL(shell(), start_url));
@@ -6020,7 +6017,7 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
EXPECT_TRUE(ExecuteScript(root, kAddNamedFrameScript));
EXPECT_EQ(1U, root->child_count());
EXPECT_EQ(1U, nav_entry->root_node()->children.size());
- tree_node = nav_entry->root_node()->children[0];
+ auto* tree_node = nav_entry->root_node()->children[0].get();
EXPECT_TRUE(ExecuteScript(root, kRemoveFrameScript));
EXPECT_EQ(0U, root->child_count());
@@ -6032,7 +6029,7 @@ IN_PROC_BROWSER_TEST_F(NavigationControllerBrowserTest,
EXPECT_TRUE(ExecuteScript(root, kAddNamedFrameScript));
EXPECT_EQ(1U, root->child_count());
EXPECT_EQ(1U, nav_entry->root_node()->children.size());
- EXPECT_EQ(tree_node, nav_entry->root_node()->children[0]);
+ EXPECT_EQ(tree_node, nav_entry->root_node()->children[0].get());
EXPECT_TRUE(ExecuteScript(root, kRemoveFrameScript));
EXPECT_EQ(0U, root->child_count());

Powered by Google App Engine
This is Rietveld 408576698