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

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

Issue 1078873004: Address the TODOs in the PushMessagingBrowserTest for the endpoint merge. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@push-subscriptionId
Patch Set: rebase Created 5 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
« no previous file with comments | « no previous file | chrome/test/data/push_messaging/push_test.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/push_messaging/push_messaging_browsertest.cc
diff --git a/chrome/browser/push_messaging/push_messaging_browsertest.cc b/chrome/browser/push_messaging/push_messaging_browsertest.cc
index c0cadf42fafd20e78d903d2fd08cf8bc48225a23..2b5407ed0d72f7530d80695ad2bece679da2addb 100644
--- a/chrome/browser/push_messaging/push_messaging_browsertest.cc
+++ b/chrome/browser/push_messaging/push_messaging_browsertest.cc
@@ -150,6 +150,10 @@ class PushMessagingBrowserTest : public InProcessBrowserTest {
void TryToSubscribeSuccessfully(
const std::string& expected_push_subscription_id);
+ std::string GetEndpointForSubscriptionId(const std::string& subscription_id) {
+ return std::string(kPushMessagingEndpoint) + "/" + subscription_id;
+ }
+
PushMessagingApplicationId GetServiceWorkerAppId(
int64 service_worker_registration_id);
@@ -223,9 +227,8 @@ void PushMessagingBrowserTest::TryToSubscribeSuccessfully(
EXPECT_EQ("permission status - granted", script_result);
EXPECT_TRUE(RunScript("subscribePush()", &script_result));
-
- // TODO(peter): Add an EXPECT for the given endpoint after the value change
- // has gone through.
+ EXPECT_EQ(GetEndpointForSubscriptionId(expected_push_subscription_id),
+ script_result);
}
PushMessagingApplicationId PushMessagingBrowserTest::GetServiceWorkerAppId(
@@ -264,9 +267,8 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest,
InfoBarResponder accepting_responder(GetInfoBarService(), true);
ASSERT_TRUE(RunScript("subscribePush()", &script_result));
-
- // TODO(peter): Add an EXPECT for the given endpoint after the value change
- // has gone through.
+ EXPECT_EQ(GetEndpointForSubscriptionId("1-0"),
+ script_result);
PushMessagingApplicationId app_id = GetServiceWorkerAppId(0LL);
EXPECT_EQ(app_id.app_id_guid(), gcm_service()->last_registered_app_id());
@@ -590,9 +592,8 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, PermissionStateSaysGranted) {
EXPECT_EQ("permission status - granted", script_result);
ASSERT_TRUE(RunScript("subscribePush()", &script_result));
-
- // TODO(peter): Add an EXPECT for the given endpoint after the value change
- // has gone through.
+ EXPECT_EQ(GetEndpointForSubscriptionId("1-0"),
+ script_result);
ASSERT_TRUE(RunScript("permissionState()", &script_result));
EXPECT_EQ("permission status - granted", script_result);
« no previous file with comments | « no previous file | chrome/test/data/push_messaging/push_test.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698