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

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

Issue 2675483002: Replace PermissionType in chrome/ with ContentSettingsType (Closed)
Patch Set: rebase 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 d33945abcc6bf933a6571c2153f5b74eb2f606b1..71dfd8966d9c14aee27e76563d587e2d966cfcd1 100644
--- a/chrome/browser/notifications/message_center_settings_controller_unittest.cc
+++ b/chrome/browser/notifications/message_center_settings_controller_unittest.cc
@@ -18,7 +18,6 @@
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile_manager.h"
#include "components/content_settings/core/browser/host_content_settings_map.h"
-#include "content/public/browser/permission_type.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "extensions/common/extension.h"
#include "extensions/common/extension_builder.h"
@@ -317,13 +316,13 @@ TEST_F(MessageCenterSettingsControllerTest, SetWebPageNotifierEnabled) {
controller()->SetNotifierEnabled(disabled_notifier, true);
EXPECT_EQ(blink::mojom::PermissionStatus::GRANTED,
permission_manager->GetPermissionStatus(
- content::PermissionType::NOTIFICATIONS, origin, origin));
+ 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,
permission_manager->GetPermissionStatus(
- content::PermissionType::NOTIFICATIONS, origin, origin));
+ CONTENT_SETTINGS_TYPE_NOTIFICATIONS, origin, origin));
// Change the default content setting vaule for notifications to ALLOW.
HostContentSettingsMapFactory::GetForProfile(profile)
@@ -334,13 +333,13 @@ TEST_F(MessageCenterSettingsControllerTest, SetWebPageNotifierEnabled) {
controller()->SetNotifierEnabled(enabled_notifier, false);
EXPECT_EQ(blink::mojom::PermissionStatus::DENIED,
permission_manager->GetPermissionStatus(
- content::PermissionType::NOTIFICATIONS, origin, origin));
+ 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,
permission_manager->GetPermissionStatus(
- content::PermissionType::NOTIFICATIONS, origin, origin));
+ CONTENT_SETTINGS_TYPE_NOTIFICATIONS, origin, origin));
// Now change the default content setting value to BLOCK.
HostContentSettingsMapFactory::GetForProfile(profile)
@@ -351,11 +350,11 @@ TEST_F(MessageCenterSettingsControllerTest, SetWebPageNotifierEnabled) {
controller()->SetNotifierEnabled(disabled_notifier, true);
EXPECT_EQ(blink::mojom::PermissionStatus::GRANTED,
permission_manager->GetPermissionStatus(
- content::PermissionType::NOTIFICATIONS, origin, origin));
+ 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,
permission_manager->GetPermissionStatus(
- content::PermissionType::NOTIFICATIONS, origin, origin));
+ CONTENT_SETTINGS_TYPE_NOTIFICATIONS, origin, origin));
}

Powered by Google App Engine
This is Rietveld 408576698