#ifndef CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_
#define CONTENT_TEST_TEST_RENDER_FRAME_HOST_H_
#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 {
class TestRenderFrameHost : public RenderFrameHostImpl {
public:
TestRenderFrameHost(RenderViewHostImpl* render_view_host,
RenderFrameHostDelegate* delegate,
FrameTree* frame_tree,
FrameTreeNode* frame_tree_node,
int routing_id,
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;
}
void set_simulate_history_list_was_cleared(bool cleared) {
simulate_history_list_was_cleared_ = cleared;
}
private:
std::string contents_mime_type_;
bool simulate_history_list_was_cleared_;
DISALLOW_COPY_AND_ASSIGN(TestRenderFrameHost);
};
}
#endif