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

Unified Diff: chrome/browser/notifications/message_center_settings_controller_unittest.cc

Issue 2713083003: Use ContentSetting in chrome/ instead of PermissionStatus (Closed)
Patch Set: really fix build? Created 3 years, 10 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/notifications/message_center_settings_controller_unittest.cc
diff --git a/chrome/browser/notifications/message_center_settings_controller_unittest.cc b/chrome/browser/notifications/message_center_settings_controller_unittest.cc
index 5f663a0982bc47d6592441d32429626784de3435..478ce4138d6d70bfdc69289072477ff5df862ec3 100644
--- a/chrome/browser/notifications/message_center_settings_controller_unittest.cc
+++ b/chrome/browser/notifications/message_center_settings_controller_unittest.cc
@@ -315,13 +315,13 @@ TEST_F(MessageCenterSettingsControllerTest, SetWebPageNotifierEnabled) {
// (1) Enable the permission when the default is to ask (expected to set).
controller()->SetNotifierEnabled(disabled_notifier, true);
- EXPECT_EQ(blink::mojom::PermissionStatus::GRANTED,
+ EXPECT_EQ(CONTENT_SETTING_ALLOW,
permission_manager->GetPermissionStatus(
CONTENT_SETTINGS_TYPE_NOTIFICATIONS, origin, origin));
// (2) Disable the permission when the default is to ask (expected to clear).
controller()->SetNotifierEnabled(enabled_notifier, false);
- EXPECT_EQ(blink::mojom::PermissionStatus::ASK,
+ EXPECT_EQ(CONTENT_SETTING_ASK,
permission_manager->GetPermissionStatus(
CONTENT_SETTINGS_TYPE_NOTIFICATIONS, origin, origin));
@@ -332,13 +332,13 @@ TEST_F(MessageCenterSettingsControllerTest, SetWebPageNotifierEnabled) {
// (3) Disable the permission when the default is allowed (expected to set).
controller()->SetNotifierEnabled(enabled_notifier, false);
- EXPECT_EQ(blink::mojom::PermissionStatus::DENIED,
+ EXPECT_EQ(CONTENT_SETTING_BLOCK,
permission_manager->GetPermissionStatus(
CONTENT_SETTINGS_TYPE_NOTIFICATIONS, origin, origin));
// (4) Enable the permission when the default is allowed (expected to clear).
controller()->SetNotifierEnabled(disabled_notifier, true);
- EXPECT_EQ(blink::mojom::PermissionStatus::GRANTED,
+ EXPECT_EQ(CONTENT_SETTING_ALLOW,
permission_manager->GetPermissionStatus(
CONTENT_SETTINGS_TYPE_NOTIFICATIONS, origin, origin));
@@ -349,13 +349,13 @@ TEST_F(MessageCenterSettingsControllerTest, SetWebPageNotifierEnabled) {
// (5) Enable the permission when the default is blocked (expected to set).
controller()->SetNotifierEnabled(disabled_notifier, true);
- EXPECT_EQ(blink::mojom::PermissionStatus::GRANTED,
+ EXPECT_EQ(CONTENT_SETTING_ALLOW,
permission_manager->GetPermissionStatus(
CONTENT_SETTINGS_TYPE_NOTIFICATIONS, origin, origin));
// (6) Disable the permission when the default is blocked (expected to clear).
controller()->SetNotifierEnabled(enabled_notifier, false);
- EXPECT_EQ(blink::mojom::PermissionStatus::DENIED,
+ EXPECT_EQ(CONTENT_SETTING_BLOCK,
permission_manager->GetPermissionStatus(
CONTENT_SETTINGS_TYPE_NOTIFICATIONS, origin, origin));
}

Powered by Google App Engine
This is Rietveld 408576698