Blink roll 174933:174969
[chromium-blink-merge.git] / content / test / content_browser_test_utils_internal.cc
blobbe503b7e83d1b5a0e55ce499ec62bc8e0b8b8e6a
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/test/content_browser_test_utils_internal.h"
7 #include "content/browser/frame_host/frame_tree_node.h"
8 #include "content/browser/frame_host/navigator.h"
9 #include "content/test/test_frame_navigation_observer.h"
10 #include "url/gurl.h"
12 namespace content {
14 void NavigateFrameToURL(FrameTreeNode* node, const GURL& url) {
15 TestFrameNavigationObserver observer(node);
16 NavigationController::LoadURLParams params(url);
17 params.transition_type = PageTransitionFromInt(PAGE_TRANSITION_LINK);
18 params.frame_tree_node_id = node->frame_tree_node_id();
19 node->navigator()->GetController()->LoadURLWithParams(params);
20 observer.Wait();
23 } // namespace content