summaryrefslogtreecommitdiffstats
path: root/content/browser/renderer_host/test_render_view_host.cc
diff options
context:
space:
mode:
authorbryner@chromium.org <bryner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-05 19:19:52 +0000
committerbryner@chromium.org <bryner@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-04-05 19:19:52 +0000
commita3c8e9989cdc5a948818b2612e698fada2b66414 (patch)
treef4c87a45cb3c0f065029be8b0938977bdc181ff8 /content/browser/renderer_host/test_render_view_host.cc
parent31c7e3b5078faa1d42d8f895f18f408887a8f570 (diff)
downloadchromium_src-a3c8e9989cdc5a948818b2612e698fada2b66414.zip
chromium_src-a3c8e9989cdc5a948818b2612e698fada2b66414.tar.gz
chromium_src-a3c8e9989cdc5a948818b2612e698fada2b66414.tar.bz2
Only run the phishing classifier on HTML and XHTML documents.
This also adds support to TestRenderViewHost for changing the MIME type that it reports in the ViewHostMsg_FrameNavigate_Params. BUG=none TEST=ClientSideDetectionHostTest.ShouldClassifyUrl Review URL: http://codereview.chromium.org/6691036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@80505 0039d316-1c4b-4281-b951-d872f2087c98
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) {