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

Unified Diff: chrome/browser/safe_browsing/client_side_detection_host_unittest.cc

Issue 636673002: Remove navigation from TestRenderViewHost (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add a TODO Created 6 years, 2 months 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
Index: chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
diff --git a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
index 7ff86627bced5dcb649d94e5d4d01417aa7d768a..00d7dfedbd4be1a584626d18aa5ca538c8eae856 100644
--- a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
+++ b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
@@ -44,7 +44,7 @@ using ::testing::SaveArg;
using ::testing::SetArgumentPointee;
using ::testing::StrictMock;
using content::BrowserThread;
-using content::RenderViewHostTester;
+using content::RenderFrameHostTester;
using content::ResourceType;
using content::WebContents;
@@ -946,7 +946,8 @@ TEST_F(ClientSideDetectionHostTest,
TEST_F(ClientSideDetectionHostTest, TestPreClassificationCheckXHTML) {
// Check that XHTML is supported, in addition to the default HTML type.
GURL url("http://host.com/xhtml");
- rvh_tester()->SetContentsMimeType("application/xhtml+xml");
+ RenderFrameHostTester::For(web_contents()->GetMainFrame())->
+ SetContentsMimeType("application/xhtml+xml");
ExpectPreClassificationChecks(url, &kFalse, &kFalse, &kFalse, &kFalse,
&kFalse, &kFalse, &kFalse, &kFalse);
NavigateAndCommit(url);
@@ -985,7 +986,8 @@ TEST_F(ClientSideDetectionHostTest, TestPreClassificationCheckMimeType) {
// same domain as the previous URL, otherwise it will create a new
// RenderViewHost that won't have the mime type set.
GURL url("http://host2.com/image.jpg");
- rvh_tester()->SetContentsMimeType("image/jpeg");
+ RenderFrameHostTester::For(web_contents()->GetMainFrame())->
+ SetContentsMimeType("image/jpeg");
ExpectPreClassificationChecks(url, &kFalse, &kFalse, &kFalse, &kFalse,
&kFalse, &kFalse, &kFalse, &kFalse);
NavigateAndCommit(url);
« no previous file with comments | « chrome/browser/geolocation/geolocation_permission_context_unittest.cc ('k') | chrome/browser/ssl/ssl_browser_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698