summaryrefslogtreecommitdiffstats
path: root/content/browser/renderer_host/test_render_view_host.cc
diff options
context:
space:
mode:
Diffstat (limited to 'content/browser/renderer_host/test_render_view_host.cc')
-rw-r--r--content/browser/renderer_host/test_render_view_host.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/content/browser/renderer_host/test_render_view_host.cc b/content/browser/renderer_host/test_render_view_host.cc
index 06e884c..6eba441 100644
--- a/content/browser/renderer_host/test_render_view_host.cc
+++ b/content/browser/renderer_host/test_render_view_host.cc
@@ -46,7 +46,8 @@ TestRenderViewHost::TestRenderViewHost(SiteInstance* instance,
kInvalidSessionStorageNamespaceId),
render_view_created_(false),
delete_counter_(NULL),
- simulate_fetch_via_proxy_(false) {
+ simulate_fetch_via_proxy_(false),
+ contents_mime_type_("text/html") {
// For normal RenderViewHosts, this is freed when |Shutdown()| is called.
// For TestRenderViewHost, the view is explicitly deleted in the destructor
// below, because TestRenderWidgetHostView::Destroy() doesn't |delete this|.
@@ -95,7 +96,7 @@ void TestRenderViewHost::SendNavigateWithTransition(
params.password_form = PasswordForm();
params.security_info = std::string();
params.gesture = NavigationGestureUser;
- params.contents_mime_type = std::string();
+ params.contents_mime_type = contents_mime_type_;
params.is_post = false;
params.was_within_same_page = false;
params.http_status_code = 0;
@@ -112,6 +113,10 @@ void TestRenderViewHost::set_simulate_fetch_via_proxy(bool proxy) {
simulate_fetch_via_proxy_ = proxy;
}
+void TestRenderViewHost::set_contents_mime_type(const std::string& mime_type) {
+ contents_mime_type_ = mime_type;
+}
+
TestRenderWidgetHostView::TestRenderWidgetHostView(RenderWidgetHost* rwh)
: rwh_(rwh),
is_showing_(false) {