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

Unified Diff: content/public/test/content_browser_test_utils.cc

Issue 248963007: Perform navigation policy check on UI thread for --site-per-process. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes based on Charlie's review. Created 6 years, 8 months 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
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*>(

Powered by Google App Engine
This is Rietveld 408576698