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

Unified Diff: content/browser/web_contents/web_contents_impl_browsertest.cc

Issue 77673003: Add frame_tree_node_id to navigation parameters. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix comments Created 7 years, 1 month 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 | « content/browser/web_contents/web_contents_impl.cc ('k') | content/public/browser/navigation_controller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/web_contents/web_contents_impl_browsertest.cc
diff --git a/content/browser/web_contents/web_contents_impl_browsertest.cc b/content/browser/web_contents/web_contents_impl_browsertest.cc
index 26a3c4177498818d9d7edd0139716cd45212b0ca..48cba05f8f4591e2276966a44876c980c2218024 100644
--- a/content/browser/web_contents/web_contents_impl_browsertest.cc
+++ b/content/browser/web_contents/web_contents_impl_browsertest.cc
@@ -3,6 +3,7 @@
// found in the LICENSE file.
#include "base/values.h"
+#include "content/browser/frame_host/navigation_entry_impl.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/public/browser/load_notification_details.h"
#include "content/public/browser/navigation_controller.h"
@@ -296,4 +297,20 @@ IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest,
EXPECT_EQ(new_size, shell()->web_contents()->GetView()->GetContainerSize());
}
+IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, OpenURLSubframe) {
+
+ // Navigate with source_frame_id 3, FrameTreeNode ID 4.
+ const GURL url("http://foo");
+ OpenURLParams params(url, Referrer(), 3, 4, CURRENT_TAB, PAGE_TRANSITION_LINK,
+ true);
+ shell()->web_contents()->OpenURL(params);
+
+ // Make sure the NavigationEntry ends up with the FrameTreeNode ID.
+ NavigationController* controller = &shell()->web_contents()->GetController();
+ EXPECT_TRUE(controller->GetPendingEntry());
+ EXPECT_EQ(4, NavigationEntryImpl::FromNavigationEntry(
+ controller->GetPendingEntry())->frame_tree_node_id());
+}
+
+
} // namespace content
« no previous file with comments | « content/browser/web_contents/web_contents_impl.cc ('k') | content/public/browser/navigation_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698