| Index: chrome/browser/safe_browsing/ping_manager_unittest.cc
|
| diff --git a/chrome/browser/safe_browsing/ping_manager_unittest.cc b/chrome/browser/safe_browsing/ping_manager_unittest.cc
|
| index 587680b6e51758314fd63b0946fc729462f6856e..7a7c162f2e8ef4c8eef2e56f44277c351c3ee23e 100644
|
| --- a/chrome/browser/safe_browsing/ping_manager_unittest.cc
|
| +++ b/chrome/browser/safe_browsing/ping_manager_unittest.cc
|
| @@ -88,7 +88,7 @@ TEST_F(SafeBrowsingPingManagerTest, TestSafeBrowsingHitUrl) {
|
| hp.threat_type = SB_THREAT_TYPE_URL_MALWARE;
|
| hp.threat_source = ThreatSource::LOCAL_PVER3;
|
| hp.is_subresource = true;
|
| - hp.is_extended_reporting = true;
|
| + hp.extended_reporting_level = SBER_LEVEL_LEGACY;
|
| hp.is_metrics_reporting_active = true;
|
|
|
| EXPECT_EQ(
|
| @@ -106,7 +106,7 @@ TEST_F(SafeBrowsingPingManagerTest, TestSafeBrowsingHitUrl) {
|
| hp.threat_type = SB_THREAT_TYPE_URL_PHISHING;
|
| hp.threat_source = ThreatSource::DATA_SAVER;
|
| hp.is_subresource = false;
|
| - hp.is_extended_reporting = true;
|
| + hp.extended_reporting_level = SBER_LEVEL_LEGACY;
|
| hp.is_metrics_reporting_active = true;
|
| EXPECT_EQ(
|
| "https://prefix.com/foo/report?client=unittest&appver=1.0&"
|
| @@ -121,9 +121,27 @@ TEST_F(SafeBrowsingPingManagerTest, TestSafeBrowsingHitUrl) {
|
|
|
| {
|
| HitReport hp(base_hp);
|
| + hp.threat_type = SB_THREAT_TYPE_URL_PHISHING;
|
| + hp.threat_source = ThreatSource::DATA_SAVER;
|
| + hp.is_subresource = false;
|
| + hp.extended_reporting_level = SBER_LEVEL_SCOUT;
|
| + hp.is_metrics_reporting_active = true;
|
| + EXPECT_EQ(
|
| + "https://prefix.com/foo/report?client=unittest&appver=1.0&"
|
| + "pver=3.0" +
|
| + key_param_ +
|
| + "&ext=2&evts=phishblhit&"
|
| + "evtd=http%3A%2F%2Fmalicious.url.com%2F&"
|
| + "evtr=http%3A%2F%2Fpage.url.com%2F&evhr=http%3A%2F%2Freferrer."
|
| + "url.com%2F&evtb=0&src=ds&m=1",
|
| + ping_manager()->SafeBrowsingHitUrl(hp).spec());
|
| + }
|
| +
|
| + {
|
| + HitReport hp(base_hp);
|
| hp.threat_type = SB_THREAT_TYPE_BINARY_MALWARE_URL;
|
| hp.threat_source = ThreatSource::REMOTE;
|
| - hp.is_extended_reporting = false;
|
| + hp.extended_reporting_level = SBER_LEVEL_OFF;
|
| hp.is_metrics_reporting_active = true;
|
| hp.is_subresource = false;
|
| EXPECT_EQ(
|
| @@ -141,7 +159,7 @@ TEST_F(SafeBrowsingPingManagerTest, TestSafeBrowsingHitUrl) {
|
| HitReport hp(base_hp);
|
| hp.threat_type = SB_THREAT_TYPE_CLIENT_SIDE_PHISHING_URL;
|
| hp.threat_source = ThreatSource::LOCAL_PVER4;
|
| - hp.is_extended_reporting = false;
|
| + hp.extended_reporting_level = SBER_LEVEL_OFF;
|
| hp.is_metrics_reporting_active = false;
|
| hp.is_subresource = false;
|
| EXPECT_EQ(
|
| @@ -159,7 +177,7 @@ TEST_F(SafeBrowsingPingManagerTest, TestSafeBrowsingHitUrl) {
|
| HitReport hp(base_hp);
|
| hp.threat_type = SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL;
|
| hp.threat_source = ThreatSource::LOCAL_PVER4;
|
| - hp.is_extended_reporting = false;
|
| + hp.extended_reporting_level = SBER_LEVEL_OFF;
|
| hp.is_metrics_reporting_active = false;
|
| hp.is_subresource = true;
|
| EXPECT_EQ(
|
| @@ -178,7 +196,7 @@ TEST_F(SafeBrowsingPingManagerTest, TestSafeBrowsingHitUrl) {
|
| HitReport hp(base_hp);
|
| hp.threat_type = SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL;
|
| hp.threat_source = ThreatSource::LOCAL_PVER4;
|
| - hp.is_extended_reporting = false;
|
| + hp.extended_reporting_level = SBER_LEVEL_OFF;
|
| hp.is_metrics_reporting_active = false;
|
| hp.is_subresource = true;
|
| hp.population_id = "foo bar";
|
| @@ -266,7 +284,7 @@ TEST_F(SafeBrowsingPingManagerTest, TestReportSafeBrowsingHit) {
|
| hp.referrer_url = GURL("http://referrer.url.com");
|
| hp.threat_type = SB_THREAT_TYPE_CLIENT_SIDE_MALWARE_URL;
|
| hp.threat_source = ThreatSource::LOCAL_PVER4;
|
| - hp.is_extended_reporting = false;
|
| + hp.extended_reporting_level = SBER_LEVEL_OFF;
|
| hp.is_metrics_reporting_active = false;
|
| hp.is_subresource = true;
|
| hp.population_id = "foo bar";
|
|
|