Index: chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc |
diff --git a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc |
index 664a6b70bc61f9085f9e6752c2b5de08dcb15e87..3043a9524c59a076877305b0c7a32ec577029337 100644 |
--- a/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc |
+++ b/chrome/browser/safe_browsing/safe_browsing_blocking_page_unittest.cc |
@@ -664,72 +664,3 @@ TEST_F(SafeBrowsingBlockingPageTest, MalwareReportsToggling) { |
EXPECT_FALSE(profile->GetPrefs()->GetBoolean( |
prefs::kSafeBrowsingExtendedReportingEnabled)); |
} |
- |
-// Test that the transition from old to new preference works. |
-TEST_F(SafeBrowsingBlockingPageTest, MalwareReportsTransitionEnabled) { |
- // The old pref is enabled. |
- Profile* profile = Profile::FromBrowserContext( |
- web_contents()->GetBrowserContext()); |
- profile->GetPrefs()->SetBoolean(prefs::kSafeBrowsingReportingEnabled, true); |
- |
- // Start a load. |
- controller().LoadURL(GURL(kBadURL), content::Referrer(), |
- content::PAGE_TRANSITION_TYPED, std::string()); |
- |
- // Simulate the load causing a safe browsing interstitial to be shown. |
- ShowInterstitial(false, kBadURL); |
- SafeBrowsingBlockingPage* sb_interstitial = |
- GetSafeBrowsingBlockingPage(); |
- ASSERT_TRUE(sb_interstitial); |
- |
- base::RunLoop().RunUntilIdle(); |
- |
- // At this point, nothing should have changed yet. |
- EXPECT_FALSE(profile->GetPrefs()->GetBoolean( |
- prefs::kSafeBrowsingExtendedReportingEnabled)); |
- |
- ProceedThroughInterstitial(sb_interstitial); |
- |
- // Since the user has proceeded without changing the checkbox, the new pref |
- // has been updated. |
- EXPECT_TRUE(profile->GetPrefs()->GetBoolean( |
- prefs::kSafeBrowsingExtendedReportingEnabled)); |
-} |
- |
-// Test that the transition from old to new preference still respects the |
-// user's checkbox preferences. |
-TEST_F(SafeBrowsingBlockingPageTest, MalwareReportsTransitionDisabled) { |
- // The old pref is enabled. |
- Profile* profile = Profile::FromBrowserContext( |
- web_contents()->GetBrowserContext()); |
- profile->GetPrefs()->SetBoolean(prefs::kSafeBrowsingReportingEnabled, true); |
- |
- // Start a load. |
- controller().LoadURL(GURL(kBadURL), content::Referrer(), |
- content::PAGE_TRANSITION_TYPED, std::string()); |
- |
- // Simulate the load causing a safe browsing interstitial to be shown. |
- ShowInterstitial(false, kBadURL); |
- SafeBrowsingBlockingPage* sb_interstitial = |
- GetSafeBrowsingBlockingPage(); |
- ASSERT_TRUE(sb_interstitial); |
- |
- base::RunLoop().RunUntilIdle(); |
- |
- // At this point, nothing should have changed yet. |
- EXPECT_FALSE(profile->GetPrefs()->GetBoolean( |
- prefs::kSafeBrowsingExtendedReportingEnabled)); |
- |
- // Simulate the user uncheck the report agreement checkbox. |
- sb_interstitial->SetReportingPreference(false); |
- |
- ProceedThroughInterstitial(sb_interstitial); |
- |
- // The new pref is turned off. |
- EXPECT_FALSE(profile->GetPrefs()->GetBoolean( |
- prefs::kSafeBrowsingExtendedReportingEnabled)); |
- EXPECT_FALSE(profile->GetPrefs()->GetBoolean( |
- prefs::kSafeBrowsingReportingEnabled)); |
- EXPECT_FALSE(profile->GetPrefs()->GetBoolean( |
- prefs::kSafeBrowsingDownloadFeedbackEnabled)); |
-} |