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

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

Issue 2151993002: [WebAPKs] Plumb service worker scope to notifications (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge branch 'master' into notification_scope Created 4 years, 5 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/platform_notification_service_unittest.cc
diff --git a/chrome/browser/notifications/platform_notification_service_unittest.cc b/chrome/browser/notifications/platform_notification_service_unittest.cc
index 12872acc57629820439219d1222f1b3ce2cc7409..451a2dbfddc53cb52bbe9cf5090128ebbeb7eac4 100644
--- a/chrome/browser/notifications/platform_notification_service_unittest.cc
+++ b/chrome/browser/notifications/platform_notification_service_unittest.cc
@@ -199,8 +199,8 @@ TEST_F(PlatformNotificationServiceTest, PersistentNotificationDisplay) {
notification_data.body = base::ASCIIToUTF16("Hello, world!");
service()->DisplayPersistentNotification(
- profile(), kPersistentNotificationId, GURL("https://chrome.com/"),
- notification_data, NotificationResources());
+ profile(), kPersistentNotificationId, GURL() /* service_worker_scope */,
+ GURL("https://chrome.com/"), notification_data, NotificationResources());
ASSERT_EQ(1u, GetNotificationCount());
@@ -266,7 +266,8 @@ TEST_F(PlatformNotificationServiceTest, DisplayPersistentNotificationMatches) {
notification_resources.action_icons.resize(notification_data.actions.size());
service()->DisplayPersistentNotification(
- profile(), 0u /* persistent notification */, GURL("https://chrome.com/"),
+ profile(), 0u /* persistent notification */,
+ GURL() /* service_worker_scope */, GURL("https://chrome.com/"),
notification_data, notification_resources);
ASSERT_EQ(1u, GetNotificationCount());
@@ -304,8 +305,8 @@ TEST_F(PlatformNotificationServiceTest, NotificationPermissionLastUsage) {
base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(1));
service()->DisplayPersistentNotification(
- profile(), 42 /* sw_registration_id */, origin,
- PlatformNotificationData(), NotificationResources());
+ profile(), 42 /* sw_registration_id */, GURL() /* service_worker_scope */,
+ origin, PlatformNotificationData(), NotificationResources());
base::Time after_persistent_notification =
HostContentSettingsMapFactory::GetForProfile(profile())->GetLastUsage(
@@ -407,8 +408,9 @@ TEST_F(PlatformNotificationServiceTest, CreateNotificationFromData) {
notification_data.body = base::ASCIIToUTF16("Hello, world!");
Notification notification = service()->CreateNotificationFromData(
- profile(), GURL("https://chrome.com/"), notification_data,
- NotificationResources(), new MockNotificationDelegate("hello"));
+ profile(), GURL() /* service_worker_scope */, GURL("https://chrome.com/"),
+ notification_data, NotificationResources(),
+ new MockNotificationDelegate("hello"));
EXPECT_TRUE(notification.context_message().empty());
// Create a mocked extension.
@@ -429,6 +431,7 @@ TEST_F(PlatformNotificationServiceTest, CreateNotificationFromData) {
notification = service()->CreateNotificationFromData(
profile(),
+ GURL() /* service_worker_scope */,
GURL("chrome-extension://honijodknafkokifofgiaalefdiedpko/main.html"),
notification_data, NotificationResources(),
new MockNotificationDelegate("hello"));

Powered by Google App Engine
This is Rietveld 408576698