diff options
author | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-02 17:25:58 +0000 |
---|---|---|
committer | jam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-02 17:25:58 +0000 |
commit | 0ba79c484f962a1f1711e7cea9cff873ebe9bc78 (patch) | |
tree | f76124616f556c759dc8fb153511d60be58de394 /chrome/browser | |
parent | 462a0ff505f9b9ff66e50939dda900f299a9812b (diff) | |
download | chromium_src-0ba79c484f962a1f1711e7cea9cff873ebe9bc78.zip chromium_src-0ba79c484f962a1f1711e7cea9cff873ebe9bc78.tar.gz chromium_src-0ba79c484f962a1f1711e7cea9cff873ebe9bc78.tar.bz2 |
fix bad merge
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87623 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/safe_browsing/client_side_detection_host_unittest.cc | 38 |
1 files changed, 8 insertions, 30 deletions
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 fd9fa38..b44ffba 100644 --- a/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc +++ b/chrome/browser/safe_browsing/client_side_detection_host_unittest.cc @@ -292,19 +292,9 @@ TEST_F(ClientSideDetectionHostTest, OnDetectedPhishingSiteShowInterstitial) { EXPECT_TRUE(Mock::VerifyAndClear(csd_service_.get())); ASSERT_TRUE(cb); - SafeBrowsingService::Client* client; - EXPECT_CALL(*sb_service_, - DisplayBlockingPage( - phishing_url, - phishing_url, - _, - ResourceType::MAIN_FRAME, - SafeBrowsingService::CLIENT_SIDE_PHISHING_URL, - _ /* a CsdClient object */, - contents()->GetRenderProcessHost()->id(), - contents()->render_view_host()->routing_id())) - .WillOnce(SaveArg<5>(&client)); - + SafeBrowsingService::UnsafeResource resource; + EXPECT_CALL(*sb_service_, DoDisplayBlockingPage(_)) + .WillOnce(SaveArg<0>(&resource)); cb->Run(phishing_url, true); delete cb; @@ -312,7 +302,7 @@ TEST_F(ClientSideDetectionHostTest, OnDetectedPhishingSiteShowInterstitial) { EXPECT_TRUE(Mock::VerifyAndClear(sb_service_.get())); EXPECT_EQ(phishing_url, resource.url); EXPECT_EQ(phishing_url, resource.original_url); - EXPECT_EQ(ResourceType::MAIN_FRAME, resource.resource_type); + EXPECT_EQ(false, resource.is_subresource); EXPECT_EQ(SafeBrowsingService::CLIENT_SIDE_PHISHING_URL, resource.threat_type); EXPECT_EQ(contents()->GetRenderProcessHost()->id(), @@ -376,21 +366,9 @@ TEST_F(ClientSideDetectionHostTest, OnDetectedPhishingSiteMultiplePings) { // We expect that the interstitial is shown for the second phishing URL and // not for the first phishing URL. - EXPECT_CALL(*sb_service_, - DisplayBlockingPage(phishing_url, phishing_url,_, _, _, _, _, _)) - .Times(0); - SafeBrowsingService::Client* client; - EXPECT_CALL(*sb_service_, - DisplayBlockingPage( - other_phishing_url, - other_phishing_url, - _, - ResourceType::MAIN_FRAME, - SafeBrowsingService::CLIENT_SIDE_PHISHING_URL, - _ /* a CsdClient object */, - contents()->GetRenderProcessHost()->id(), - contents()->render_view_host()->routing_id())) - .WillOnce(SaveArg<5>(&client)); + SafeBrowsingService::UnsafeResource resource; + EXPECT_CALL(*sb_service_, DoDisplayBlockingPage(_)) + .WillOnce(SaveArg<0>(&resource)); cb->Run(phishing_url, true); // Should have no effect. delete cb; @@ -401,7 +379,7 @@ TEST_F(ClientSideDetectionHostTest, OnDetectedPhishingSiteMultiplePings) { EXPECT_TRUE(Mock::VerifyAndClear(sb_service_.get())); EXPECT_EQ(other_phishing_url, resource.url); EXPECT_EQ(other_phishing_url, resource.original_url); - EXPECT_EQ(ResourceType::MAIN_FRAME, resource.resource_type); + EXPECT_EQ(false, resource.is_subresource); EXPECT_EQ(SafeBrowsingService::CLIENT_SIDE_PHISHING_URL, resource.threat_type); EXPECT_EQ(contents()->GetRenderProcessHost()->id(), |