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

Unified Diff: chrome/browser/plugins/chrome_plugin_service_filter_unittest.cc

Issue 2735333002: Rename SiteEngagementService::ResetScoreForURL. (Closed)
Patch Set: Created 3 years, 9 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/plugins/chrome_plugin_service_filter_unittest.cc
diff --git a/chrome/browser/plugins/chrome_plugin_service_filter_unittest.cc b/chrome/browser/plugins/chrome_plugin_service_filter_unittest.cc
index 77543c05a30a651437a40b84956aac0c4baaa0a8..d0f518f29df250bff63a25241fefecde772c7b4f 100644
--- a/chrome/browser/plugins/chrome_plugin_service_filter_unittest.cc
+++ b/chrome/browser/plugins/chrome_plugin_service_filter_unittest.cc
@@ -210,7 +210,7 @@ TEST_F(ChromePluginServiceFilterTest,
ChromePluginServiceFilter::kEngagementNoSettingHistogram, 0, 1);
SiteEngagementService* service = SiteEngagementService::Get(profile());
- service->ResetScoreForURL(url, 10.0);
+ service->ResetBaseScoreForURL(url, 10.0);
// Should still be blocked.
EXPECT_FALSE(IsPluginAvailable(
@@ -219,7 +219,7 @@ TEST_F(ChromePluginServiceFilterTest,
ChromePluginServiceFilter::kEngagementNoSettingHistogram, 10, 1);
// Reaching 30.0 engagement should allow Flash.
- service->ResetScoreForURL(url, 30.0);
+ service->ResetBaseScoreForURL(url, 30.0);
EXPECT_TRUE(IsPluginAvailable(url, main_frame_origin,
profile()->GetResourceContext(), flash_plugin));
@@ -285,16 +285,16 @@ TEST_F(ChromePluginServiceFilterTest, PreferHtmlOverPluginsCustomEngagement) {
// Should still be blocked until engagement reaches 50.
SiteEngagementService* service = SiteEngagementService::Get(profile());
- service->ResetScoreForURL(url, 0.0);
+ service->ResetBaseScoreForURL(url, 0.0);
EXPECT_FALSE(IsPluginAvailable(
url, main_frame_origin, profile()->GetResourceContext(), flash_plugin));
- service->ResetScoreForURL(url, 10.0);
+ service->ResetBaseScoreForURL(url, 10.0);
EXPECT_FALSE(IsPluginAvailable(
url, main_frame_origin, profile()->GetResourceContext(), flash_plugin));
- service->ResetScoreForURL(url, 40.0);
+ service->ResetBaseScoreForURL(url, 40.0);
EXPECT_FALSE(IsPluginAvailable(
url, main_frame_origin, profile()->GetResourceContext(), flash_plugin));
- service->ResetScoreForURL(url, 60.0);
+ service->ResetBaseScoreForURL(url, 60.0);
EXPECT_TRUE(IsPluginAvailable(url, main_frame_origin,
profile()->GetResourceContext(), flash_plugin));
@@ -337,7 +337,7 @@ TEST_F(ChromePluginServiceFilterTest,
// Add sufficient engagement to allow Flash in the original profile.
SiteEngagementService* service = SiteEngagementService::Get(profile());
- service->ResetScoreForURL(url, 30.0);
+ service->ResetBaseScoreForURL(url, 30.0);
// We should still fail the engagement check due to the block.
EXPECT_FALSE(IsPluginAvailable(
@@ -397,7 +397,7 @@ TEST_F(ChromePluginServiceFilterTest,
// Add sufficient engagement to allow Flash in the incognito profile.
SiteEngagementService* service = SiteEngagementService::Get(incognito);
- service->ResetScoreForURL(url, 30.0);
+ service->ResetBaseScoreForURL(url, 30.0);
// Ensure we pass the engagement check in the incognito profile.
EXPECT_TRUE(IsPluginAvailable(url, main_frame_origin,
@@ -428,9 +428,9 @@ TEST_F(ChromePluginServiceFilterTest, ManagedSetting) {
url::Origin main_frame_origin(url);
NavigateAndCommit(url);
- service->ResetScoreForURL(url, 30.0);
+ service->ResetBaseScoreForURL(url, 30.0);
// Reaching 30.0 engagement would usually allow Flash, but not for enterprise.
- service->ResetScoreForURL(url, 0);
+ service->ResetBaseScoreForURL(url, 0);
EXPECT_FALSE(IsPluginAvailable(
url, main_frame_origin, profile()->GetResourceContext(), flash_plugin));

Powered by Google App Engine
This is Rietveld 408576698