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

Unified Diff: content/browser/tab_contents/test_tab_contents.cc

Issue 8801003: Make TestTabContents::TestDidNavigate not take a ViewHostMsg_FrameNavigate_Params, since that's a... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Remove the accidental commenting out that I had done before last commit Created 9 years 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
« no previous file with comments | « content/browser/tab_contents/test_tab_contents.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tab_contents/test_tab_contents.cc
===================================================================
--- content/browser/tab_contents/test_tab_contents.cc (revision 113025)
+++ content/browser/tab_contents/test_tab_contents.cc (working copy)
@@ -11,7 +11,10 @@
#include "content/browser/renderer_host/render_view_host.h"
#include "content/browser/renderer_host/test_render_view_host.h"
#include "content/browser/site_instance.h"
+#include "content/common/view_messages.h"
#include "content/public/common/page_transition_types.h"
+#include "webkit/glue/password_form.h"
+#include "webkit/glue/webkit_glue.h"
TestTabContents::TestTabContents(content::BrowserContext* browser_context,
SiteInstance* instance)
@@ -32,6 +35,43 @@
render_manager_.pending_render_view_host_);
}
+void TestTabContents::TestDidNavigate(RenderViewHost* render_view_host,
+ int page_id,
+ const GURL& url,
+ content::PageTransition transition) {
+ TestDidNavigateWithReferrer(render_view_host,
+ page_id,
+ url,
+ content::Referrer(),
+ transition);
+}
+
+void TestTabContents::TestDidNavigateWithReferrer(
+ RenderViewHost* render_view_host,
+ int page_id,
+ const GURL& url,
+ const content::Referrer& referrer,
+ content::PageTransition transition) {
+ ViewHostMsg_FrameNavigate_Params params;
+
+ params.page_id = page_id;
+ params.url = url;
+ params.referrer = referrer;
+ params.transition = transition;
+ params.redirects = std::vector<GURL>();
+ params.should_update_history = false;
+ params.searchable_form_url = GURL();
+ params.searchable_form_encoding = std::string();
+ params.password_form = webkit_glue::PasswordForm();
+ params.security_info = std::string();
+ params.gesture = NavigationGestureUser;
+ params.was_within_same_page = false;
+ params.is_post = false;
+ params.content_state = webkit_glue::CreateHistoryStateForURL(GURL(url));
+
+ DidNavigate(render_view_host, params);
+}
+
bool TestTabContents::CreateRenderViewForRenderManager(
RenderViewHost* render_view_host) {
// This will go to a TestRenderViewHost.
« no previous file with comments | « content/browser/tab_contents/test_tab_contents.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698