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

Unified Diff: chrome/browser/extensions/service_worker_apitest.cc

Issue 2713083003: Use ContentSetting in chrome/ instead of PermissionStatus (Closed)
Patch Set: maybe fix android compile + address comments + basic tests 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/extensions/service_worker_apitest.cc
diff --git a/chrome/browser/extensions/service_worker_apitest.cc b/chrome/browser/extensions/service_worker_apitest.cc
index 7615b12529c40d16c62fe1ebac29ef398dc99b8a..c0222982ef5c4d20af22c65226e0f3591c1efb30 100644
--- a/chrome/browser/extensions/service_worker_apitest.cc
+++ b/chrome/browser/extensions/service_worker_apitest.cc
@@ -14,6 +14,7 @@
#include "chrome/browser/gcm/gcm_profile_service_factory.h"
#include "chrome/browser/notifications/desktop_notification_profile_util.h"
#include "chrome/browser/permissions/permission_manager.h"
+#include "chrome/browser/permissions/permission_result.h"
#include "chrome/browser/push_messaging/push_messaging_app_identifier.h"
#include "chrome/browser/push_messaging/push_messaging_service_factory.h"
#include "chrome/browser/push_messaging/push_messaging_service_impl.h"
@@ -223,9 +224,11 @@ class ServiceWorkerPushMessagingTest : public ServiceWorkerTest {
void GrantNotificationPermissionForTest(const GURL& url) {
GURL origin = url.GetOrigin();
DesktopNotificationProfileUtil::GrantPermission(profile(), origin);
- ASSERT_EQ(blink::mojom::PermissionStatus::GRANTED,
- PermissionManager::Get(profile())->GetPermissionStatus(
- CONTENT_SETTINGS_TYPE_NOTIFICATIONS, origin, origin));
+ ASSERT_EQ(CONTENT_SETTING_ALLOW,
+ PermissionManager::Get(profile())
+ ->GetPermissionStatus(CONTENT_SETTINGS_TYPE_NOTIFICATIONS,
+ origin, origin)
+ .content_setting);
}
PushMessagingAppIdentifier GetAppIdentifierForServiceWorkerRegistration(

Powered by Google App Engine
This is Rietveld 408576698