Index: content/test/content_browser_test_utils_internal.cc |
diff --git a/content/test/content_browser_test_utils_internal.cc b/content/test/content_browser_test_utils_internal.cc |
new file mode 100644 |
index 0000000000000000000000000000000000000000..be503b7e83d1b5a0e55ce499ec62bc8e0b8b8e6a |
--- /dev/null |
+++ b/content/test/content_browser_test_utils_internal.cc |
@@ -0,0 +1,23 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#include "content/test/content_browser_test_utils_internal.h" |
+ |
+#include "content/browser/frame_host/frame_tree_node.h" |
+#include "content/browser/frame_host/navigator.h" |
+#include "content/test/test_frame_navigation_observer.h" |
+#include "url/gurl.h" |
+ |
+namespace content { |
+ |
+void NavigateFrameToURL(FrameTreeNode* node, const GURL& url) { |
+ TestFrameNavigationObserver observer(node); |
+ NavigationController::LoadURLParams params(url); |
+ params.transition_type = PageTransitionFromInt(PAGE_TRANSITION_LINK); |
+ params.frame_tree_node_id = node->frame_tree_node_id(); |
+ node->navigator()->GetController()->LoadURLWithParams(params); |
+ observer.Wait(); |
+} |
+ |
+} // namespace content |