| 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 5ca8bf291dbb650cf09886780269c904d3691c8c..79015e7e8b03a3efee39beb8ce2690a16b511d51 100644
|
| --- a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
|
| +++ b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc
|
| @@ -222,6 +222,7 @@ class ClientSideDetectionHostTest : public ChromeRenderViewHostTestHarness {
|
| // We need to create this here since we don't call DidStopLanding in
|
| // this test.
|
| csd_host_->browse_info_.reset(new BrowseInfo);
|
| + ClientSideDetectionHost::IgnoreMimeTypeCheckForTesting(true);
|
| }
|
|
|
| void TearDown() override {
|
| @@ -233,6 +234,7 @@ class ClientSideDetectionHostTest : public ChromeRenderViewHostTestHarness {
|
| ui_manager_ = NULL;
|
| base::RunLoop().RunUntilIdle();
|
| ChromeRenderViewHostTestHarness::TearDown();
|
| + ClientSideDetectionHost::IgnoreMimeTypeCheckForTesting(false);
|
| }
|
|
|
| content::BrowserContext* CreateBrowserContext() override {
|
| @@ -1033,6 +1035,7 @@ TEST_F(ClientSideDetectionHostTest, TestPreClassificationCheckMimeType) {
|
| // Note: for this test to work correctly, the new URL must be on the
|
| // same domain as the previous URL, otherwise it will create a new
|
| // RenderFrameHost that won't have the mime type set.
|
| + ClientSideDetectionHost::IgnoreMimeTypeCheckForTesting(false);
|
| GURL url("http://host2.com/image.jpg");
|
| RenderFrameHostTester::For(web_contents()->GetMainFrame())->
|
| SetContentsMimeType("image/jpeg");
|
| @@ -1043,6 +1046,7 @@ TEST_F(ClientSideDetectionHostTest, TestPreClassificationCheckMimeType) {
|
|
|
| ExpectStartPhishingDetection(NULL);
|
| ExpectShouldClassifyForMalwareResult(true);
|
| + ClientSideDetectionHost::IgnoreMimeTypeCheckForTesting(true);
|
| }
|
|
|
| TEST_F(ClientSideDetectionHostTest,
|
|
|