summaryrefslogtreecommitdiffstats
path: root/content/test/test_render_frame_host.h
diff options
context:
space:
mode:
authornasko@chromium.org <nasko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-12 01:12:22 +0000
committernasko@chromium.org <nasko@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-12 01:12:22 +0000
commit37567b43f9e0e76a4ca7704c99e7c41eb547e30f (patch)
treefc0b0d96c10f3fb0c75adc55aa3f7e0db264545e /content/test/test_render_frame_host.h
parent284ffacb7c8a4eded2a4d28c4246fed84f0a8990 (diff)
downloadchromium_src-37567b43f9e0e76a4ca7704c99e7c41eb547e30f.zip
chromium_src-37567b43f9e0e76a4ca7704c99e7c41eb547e30f.tar.gz
chromium_src-37567b43f9e0e76a4ca7704c99e7c41eb547e30f.tar.bz2
Move DidCommitProvisionalLoad code from RenderView to RenderFrame.
Another attempt at landing this. Original CL is https://codereview.chromium.org/135723003/ and patchset 1 is identical to it. BUG=304341 Review URL: https://codereview.chromium.org/132743011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@250591 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/test/test_render_frame_host.h')
-rw-r--r--content/test/test_render_frame_host.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/content/test/test_render_frame_host.h b/content/test/test_render_frame_host.h
index 7668b25..25caa87 100644
--- a/content/test/test_render_frame_host.h
+++ b/content/test/test_render_frame_host.h
@@ -7,6 +7,9 @@
#include "base/basictypes.h"
#include "content/browser/frame_host/render_frame_host_impl.h"
+#include "content/public/common/page_transition_types.h"
+
+struct FrameHostMsg_DidCommitProvisionalLoad_Params;
namespace content {
@@ -20,10 +23,55 @@ class TestRenderFrameHost : public RenderFrameHostImpl {
bool is_swapped_out);
virtual ~TestRenderFrameHost();
+ void SendNavigate(int page_id, const GURL& url);
+ void SendNavigateWithTransition(
+ int page_id,
+ const GURL& url,
+ PageTransition transition);
+ void SendFailedNavigate(int page_id, const GURL& url);
+ void SendNavigateWithTransitionAndResponseCode(
+ int page_id,
+ const GURL& url, PageTransition transition,
+ int response_code);
+ void SendNavigateWithOriginalRequestURL(
+ int page_id,
+ const GURL& url,
+ const GURL& original_request_url);
+ void SendNavigateWithFile(
+ int page_id,
+ const GURL& url,
+ const base::FilePath& file_path);
+ void SendNavigateWithParams(
+ FrameHostMsg_DidCommitProvisionalLoad_Params* params);
+ void SendNavigateWithParameters(
+ int page_id,
+ const GURL& url,
+ PageTransition transition,
+ const GURL& original_request_url,
+ int response_code,
+ const base::FilePath* file_path_for_history_item);
+
+ void set_contents_mime_type(const std::string& mime_type) {
+ contents_mime_type_ = mime_type;
+ }
+
+ // If set, navigations will appear to have cleared the history list in the
+ // RenderFrame
+ // (FrameHostMsg_DidCommitProvisionalLoad_Params::history_list_was_cleared).
+ // False by default.
+ void set_simulate_history_list_was_cleared(bool cleared) {
+ simulate_history_list_was_cleared_ = cleared;
+ }
+
// TODO(nick): As necessary for testing, override behavior of RenderFrameHost
// here.
private:
+ std::string contents_mime_type_;
+
+ // See set_simulate_history_list_was_cleared() above.
+ bool simulate_history_list_was_cleared_;
+
DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost);
};