Index: chrome/browser/services/gcm/push_messaging_browsertest.cc |
diff --git a/chrome/browser/services/gcm/push_messaging_browsertest.cc b/chrome/browser/services/gcm/push_messaging_browsertest.cc |
index 842d9053ac6863215cb10817e51aa6f6c021a590..acf928a931b451fdec1656dd6c11afc97f9d7d02 100644 |
--- a/chrome/browser/services/gcm/push_messaging_browsertest.cc |
+++ b/chrome/browser/services/gcm/push_messaging_browsertest.cc |
@@ -268,7 +268,7 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, |
TryToRegisterSuccessfully("1-0" /* expected_push_registration_id */); |
PushMessagingApplicationId app_id = GetServiceWorkerAppId(0LL); |
- EXPECT_EQ(app_id.app_id_guid, gcm_service()->last_registered_app_id()); |
+ EXPECT_EQ(app_id.app_id_guid(), gcm_service()->last_registered_app_id()); |
EXPECT_EQ("1234567890", gcm_service()->last_registered_sender_ids()[0]); |
} |
@@ -284,7 +284,7 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, |
EXPECT_EQ(std::string(kPushMessagingEndpoint) + " - 1-0", script_result); |
PushMessagingApplicationId app_id = GetServiceWorkerAppId(0LL); |
- EXPECT_EQ(app_id.app_id_guid, gcm_service()->last_registered_app_id()); |
+ EXPECT_EQ(app_id.app_id_guid(), gcm_service()->last_registered_app_id()); |
EXPECT_EQ("1234567890", gcm_service()->last_registered_sender_ids()[0]); |
} |
@@ -334,7 +334,7 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, RegisterPersisted) { |
TryToRegisterSuccessfully("1-0" /* expected_push_registration_id */); |
PushMessagingApplicationId app_id_sw0 = GetServiceWorkerAppId(0LL); |
- EXPECT_EQ(app_id_sw0.app_id_guid, gcm_service()->last_registered_app_id()); |
+ EXPECT_EQ(app_id_sw0.app_id_guid(), gcm_service()->last_registered_app_id()); |
LoadTestPage("files/push_messaging/subscope1/test.html"); |
ASSERT_TRUE(RunScript("registerServiceWorker()", &script_result)); |
@@ -350,12 +350,12 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, RegisterPersisted) { |
LoadTestPage("files/push_messaging/subscope2/test.html"); |
TryToRegisterSuccessfully("1-1" /* expected_push_registration_id */); |
PushMessagingApplicationId app_id_sw2 = GetServiceWorkerAppId(2LL); |
- EXPECT_EQ(app_id_sw2.app_id_guid, gcm_service()->last_registered_app_id()); |
+ EXPECT_EQ(app_id_sw2.app_id_guid(), gcm_service()->last_registered_app_id()); |
LoadTestPage("files/push_messaging/subscope1/test.html"); |
TryToRegisterSuccessfully("1-2" /* expected_push_registration_id */); |
PushMessagingApplicationId app_id_sw1 = GetServiceWorkerAppId(1LL); |
- EXPECT_EQ(app_id_sw1.app_id_guid, gcm_service()->last_registered_app_id()); |
+ EXPECT_EQ(app_id_sw1.app_id_guid(), gcm_service()->last_registered_app_id()); |
// Now test that the Service Worker registration IDs and push registration IDs |
// generated above were persisted to SW storage, by checking that they are |
@@ -367,15 +367,15 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, RegisterPersisted) { |
LoadTestPage("files/push_messaging/subscope1/test.html"); |
TryToRegisterSuccessfully("1-2" /* expected_push_registration_id */); |
- EXPECT_EQ(app_id_sw1.app_id_guid, gcm_service()->last_registered_app_id()); |
+ EXPECT_EQ(app_id_sw1.app_id_guid(), gcm_service()->last_registered_app_id()); |
LoadTestPage("files/push_messaging/subscope2/test.html"); |
TryToRegisterSuccessfully("1-1" /* expected_push_registration_id */); |
- EXPECT_EQ(app_id_sw1.app_id_guid, gcm_service()->last_registered_app_id()); |
+ EXPECT_EQ(app_id_sw1.app_id_guid(), gcm_service()->last_registered_app_id()); |
LoadTestPage(); |
TryToRegisterSuccessfully("1-0" /* expected_push_registration_id */); |
- EXPECT_EQ(app_id_sw1.app_id_guid, gcm_service()->last_registered_app_id()); |
+ EXPECT_EQ(app_id_sw1.app_id_guid(), gcm_service()->last_registered_app_id()); |
} |
IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, PushEventSuccess) { |
@@ -384,7 +384,7 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, PushEventSuccess) { |
TryToRegisterSuccessfully("1-0" /* expected_push_registration_id */); |
PushMessagingApplicationId app_id = GetServiceWorkerAppId(0LL); |
- EXPECT_EQ(app_id.app_id_guid, gcm_service()->last_registered_app_id()); |
+ EXPECT_EQ(app_id.app_id_guid(), gcm_service()->last_registered_app_id()); |
EXPECT_EQ("1234567890", gcm_service()->last_registered_sender_ids()[0]); |
ASSERT_TRUE(RunScript("isControlled()", &script_result)); |
@@ -397,7 +397,7 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, PushEventSuccess) { |
GCMClient::IncomingMessage message; |
message.data["data"] = "testdata"; |
- push_service()->OnMessage(app_id.app_id_guid, message); |
+ push_service()->OnMessage(app_id.app_id_guid(), message); |
ASSERT_TRUE(RunScript("resultQueue.pop()", &script_result)); |
EXPECT_EQ("testdata", script_result); |
} |
@@ -408,7 +408,7 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, PushEventNoServiceWorker) { |
TryToRegisterSuccessfully("1-0" /* expected_push_registration_id */); |
PushMessagingApplicationId app_id = GetServiceWorkerAppId(0LL); |
- EXPECT_EQ(app_id.app_id_guid, gcm_service()->last_registered_app_id()); |
+ EXPECT_EQ(app_id.app_id_guid(), gcm_service()->last_registered_app_id()); |
EXPECT_EQ("1234567890", gcm_service()->last_registered_sender_ids()[0]); |
ASSERT_TRUE(RunScript("isControlled()", &script_result)); |
@@ -431,10 +431,10 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, PushEventNoServiceWorker) { |
GCMClient::IncomingMessage message; |
message.data["data"] = "testdata"; |
- push_service()->OnMessage(app_id.app_id_guid, message); |
+ push_service()->OnMessage(app_id.app_id_guid(), message); |
callback.WaitUntilSatisfied(); |
- EXPECT_EQ(app_id.app_id_guid, callback.app_id()); |
+ EXPECT_EQ(app_id.app_id_guid(), callback.app_id()); |
// No push data should have been received. |
ASSERT_TRUE(RunScript("resultQueue.popImmediately()", &script_result)); |
@@ -447,7 +447,7 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, PushEventNoPermission) { |
TryToRegisterSuccessfully("1-0" /* expected_push_registration_id */); |
PushMessagingApplicationId app_id = GetServiceWorkerAppId(0LL); |
- EXPECT_EQ(app_id.app_id_guid, gcm_service()->last_registered_app_id()); |
+ EXPECT_EQ(app_id.app_id_guid(), gcm_service()->last_registered_app_id()); |
EXPECT_EQ("1234567890", gcm_service()->last_registered_sender_ids()[0]); |
ASSERT_TRUE(RunScript("isControlled()", &script_result)); |
@@ -470,10 +470,10 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, PushEventNoPermission) { |
GCMClient::IncomingMessage message; |
message.data["data"] = "testdata"; |
- push_service()->OnMessage(app_id.app_id_guid, message); |
+ push_service()->OnMessage(app_id.app_id_guid(), message); |
callback.WaitUntilSatisfied(); |
- EXPECT_EQ(app_id.app_id_guid, callback.app_id()); |
+ EXPECT_EQ(app_id.app_id_guid(), callback.app_id()); |
// No push data should have been received. |
ASSERT_TRUE(RunScript("resultQueue.popImmediately()", &script_result)); |
@@ -488,7 +488,7 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, |
TryToRegisterSuccessfully("1-0" /* expected_push_registration_id */); |
PushMessagingApplicationId app_id = GetServiceWorkerAppId(0LL); |
- EXPECT_EQ(app_id.app_id_guid, gcm_service()->last_registered_app_id()); |
+ EXPECT_EQ(app_id.app_id_guid(), gcm_service()->last_registered_app_id()); |
EXPECT_EQ("1234567890", gcm_service()->last_registered_sender_ids()[0]); |
ASSERT_TRUE(RunScript("isControlled()", &script_result)); |
@@ -512,7 +512,7 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, |
GCMClient::IncomingMessage message; |
for (int n = 0; n < 2; n++) { |
message.data["data"] = "testdata"; |
- push_service()->OnMessage(app_id.app_id_guid, message); |
+ push_service()->OnMessage(app_id.app_id_guid(), message); |
ASSERT_TRUE(RunScript("resultQueue.pop()", &script_result)); |
EXPECT_EQ("testdata", script_result); |
EXPECT_EQ(0u, notification_manager()->GetNotificationCount()); |
@@ -527,12 +527,12 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, |
// should show a forced one, but only on the 2nd occurrence since we allow one |
// mistake per 10 push events. |
message.data["data"] = "testdata"; |
- push_service()->OnMessage(app_id.app_id_guid, message); |
+ push_service()->OnMessage(app_id.app_id_guid(), message); |
ASSERT_TRUE(RunScript("resultQueue.pop()", &script_result, web_contents)); |
EXPECT_EQ("testdata", script_result); |
EXPECT_EQ(0u, notification_manager()->GetNotificationCount()); |
message.data["data"] = "testdata"; |
- push_service()->OnMessage(app_id.app_id_guid, message); |
+ push_service()->OnMessage(app_id.app_id_guid(), message); |
ASSERT_TRUE(RunScript("resultQueue.pop()", &script_result, web_contents)); |
EXPECT_EQ("testdata", script_result); |
EXPECT_EQ(1u, notification_manager()->GetNotificationCount()); |
@@ -542,7 +542,7 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, |
// Currently, this notification will stick around until the user or webapp |
// explicitly dismisses it (though we may change this later). |
message.data["data"] = "shownotification"; |
- push_service()->OnMessage(app_id.app_id_guid, message); |
+ push_service()->OnMessage(app_id.app_id_guid(), message); |
ASSERT_TRUE(RunScript("resultQueue.pop()", &script_result, web_contents)); |
EXPECT_EQ("shownotification", script_result); |
EXPECT_EQ(2u, notification_manager()->GetNotificationCount()); |
@@ -554,7 +554,7 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, |
// should not show a forced one. |
message.data["data"] = "shownotification"; |
for (int n = 0; n < 9; n++) { |
- push_service()->OnMessage(app_id.app_id_guid, message); |
+ push_service()->OnMessage(app_id.app_id_guid(), message); |
ASSERT_TRUE(RunScript("resultQueue.pop()", &script_result, web_contents)); |
EXPECT_EQ("shownotification", script_result); |
EXPECT_EQ(1u, notification_manager()->GetNotificationCount()); |
@@ -566,7 +566,7 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, |
// Now that 10 push messages in a row have shown notifications, we should |
// allow the next one to mistakenly not show a notification. |
message.data["data"] = "testdata"; |
- push_service()->OnMessage(app_id.app_id_guid, message); |
+ push_service()->OnMessage(app_id.app_id_guid(), message); |
ASSERT_TRUE(RunScript("resultQueue.pop()", &script_result, web_contents)); |
EXPECT_EQ("testdata", script_result); |
EXPECT_EQ(0u, notification_manager()->GetNotificationCount()); |