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

Unified Diff: chrome/browser/push_messaging/push_messaging_service_unittest.cc

Issue 1931843002: Ship Web Push subscription restrictions (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/push_messaging/push_messaging_service_unittest.cc
diff --git a/chrome/browser/push_messaging/push_messaging_service_unittest.cc b/chrome/browser/push_messaging/push_messaging_service_unittest.cc
index fb3e4e356e38c918be4a163d8d6af11c69e84cf1..9f111a337c761494a5a86a4da002bde39507930e 100644
--- a/chrome/browser/push_messaging/push_messaging_service_unittest.cc
+++ b/chrome/browser/push_messaging/push_messaging_service_unittest.cc
@@ -243,3 +243,12 @@ TEST_F(PushMessagingServiceTest, NormalizeSenderInfo) {
EXPECT_EQ(p256dh, push_service->NormalizeSenderInfo(p256dh));
}
+
+TEST_F(PushMessagingServiceTest, DifferentEndpoints) {
+ PushMessagingServiceImpl* push_service = profile()->GetPushMessagingService();
+ ASSERT_TRUE(push_service);
+
+ // Verifies that the service returns different endpoints depending on whether
+ // support for the standard protocol is requested.
+ EXPECT_NE(push_service->GetEndpoint(true), push_service->GetEndpoint(false));
+}

Powered by Google App Engine
This is Rietveld 408576698