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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/values.h" 5 #include "base/values.h"
6 #include "content/browser/frame_host/navigation_entry_impl.h"
6 #include "content/browser/web_contents/web_contents_impl.h" 7 #include "content/browser/web_contents/web_contents_impl.h"
7 #include "content/public/browser/load_notification_details.h" 8 #include "content/public/browser/load_notification_details.h"
8 #include "content/public/browser/navigation_controller.h" 9 #include "content/public/browser/navigation_controller.h"
9 #include "content/public/browser/notification_details.h" 10 #include "content/public/browser/notification_details.h"
10 #include "content/public/browser/notification_observer.h" 11 #include "content/public/browser/notification_observer.h"
11 #include "content/public/browser/notification_types.h" 12 #include "content/public/browser/notification_types.h"
12 #include "content/public/browser/render_view_host.h" 13 #include "content/public/browser/render_view_host.h"
13 #include "content/public/browser/render_widget_host_view.h" 14 #include "content/public/browser/render_widget_host_view.h"
14 #include "content/public/browser/web_contents_observer.h" 15 #include "content/public/browser/web_contents_observer.h"
15 #include "content/public/browser/web_contents_view.h" 16 #include "content/public/browser/web_contents_view.h"
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 EXPECT_EQ(init_size, observer.rwhv_create_size()); 290 EXPECT_EQ(init_size, observer.rwhv_create_size());
290 // RenderViewSizeObserver resizes WebContentsView in NavigateToPendingEntry, 291 // RenderViewSizeObserver resizes WebContentsView in NavigateToPendingEntry,
291 // so both WebContentsView and RenderWidgetHostView adopt this new size. 292 // so both WebContentsView and RenderWidgetHostView adopt this new size.
292 new_size.Enlarge(size_insets.width(), size_insets.height()); 293 new_size.Enlarge(size_insets.width(), size_insets.height());
293 EXPECT_EQ(new_size, 294 EXPECT_EQ(new_size,
294 shell()->web_contents()->GetRenderWidgetHostView()->GetViewBounds(). 295 shell()->web_contents()->GetRenderWidgetHostView()->GetViewBounds().
295 size()); 296 size());
296 EXPECT_EQ(new_size, shell()->web_contents()->GetView()->GetContainerSize()); 297 EXPECT_EQ(new_size, shell()->web_contents()->GetView()->GetContainerSize());
297 } 298 }
298 299
300 IN_PROC_BROWSER_TEST_F(WebContentsImplBrowserTest, OpenURLSubframe) {
301
302 // Navigate with source_frame_id 3, FrameTreeNode ID 4.
303 const GURL url("http://foo");
304 OpenURLParams params(url, Referrer(), 3, 4, CURRENT_TAB, PAGE_TRANSITION_LINK,
305 true);
306 shell()->web_contents()->OpenURL(params);
307
308 // Make sure the NavigationEntry ends up with the FrameTreeNode ID.
309 NavigationController* controller = &shell()->web_contents()->GetController();
310 EXPECT_TRUE(controller->GetPendingEntry());
311 EXPECT_EQ(4, NavigationEntryImpl::FromNavigationEntry(
312 controller->GetPendingEntry())->frame_tree_node_id());
313 }
314
315
299 } // namespace content 316 } // namespace content
OLDNEW
« 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