Index: content/public/test/content_browser_test_utils.cc |
diff --git a/content/public/test/content_browser_test_utils.cc b/content/public/test/content_browser_test_utils.cc |
index d9448f0fc4dd1808653208cb83b890efce18d48d..376705e19b52c3020c8287eed1304109d4f139b7 100644 |
--- a/content/public/test/content_browser_test_utils.cc |
+++ b/content/public/test/content_browser_test_utils.cc |
@@ -8,6 +8,8 @@ |
#include "base/files/file_path.h" |
#include "base/path_service.h" |
#include "base/run_loop.h" |
+#include "content/browser/frame_host/frame_tree_node.h" |
+#include "content/browser/frame_host/navigator.h" |
#include "content/public/browser/navigation_controller.h" |
#include "content/public/browser/notification_source.h" |
#include "content/public/browser/web_contents.h" |
@@ -17,6 +19,7 @@ |
#include "content/public/test/test_utils.h" |
#include "content/shell/browser/shell.h" |
#include "content/shell/browser/shell_javascript_dialog_manager.h" |
+#include "content/test/test_frame_navigation_observer.h" |
#include "net/base/filename_util.h" |
namespace content { |
@@ -56,6 +59,15 @@ void NavigateToURL(Shell* window, const GURL& url) { |
NavigateToURLBlockUntilNavigationsComplete(window, url, 1); |
} |
+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(); |
+} |
+ |
void WaitForAppModalDialog(Shell* window) { |
ShellJavaScriptDialogManager* dialog_manager= |
static_cast<ShellJavaScriptDialogManager*>( |