| 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 2c543879e0ea3d215150359f744eabaa8100b0d1..feba6034e347bc9979fc61ab1e9e201208e7e787 100644
|
| --- a/chrome/browser/push_messaging/push_messaging_browsertest.cc
|
| +++ b/chrome/browser/push_messaging/push_messaging_browsertest.cc
|
| @@ -420,7 +420,7 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, PushEventSuccess) {
|
|
|
| gcm::IncomingMessage message;
|
| message.sender_id = "1234567890";
|
| - message.data["data"] = "testdata";
|
| + message.raw_data = "testdata";
|
| push_service()->OnMessage(app_identifier.app_id(), message);
|
| ASSERT_TRUE(RunScript("resultQueue.pop()", &script_result));
|
| EXPECT_EQ("testdata", script_result);
|
| @@ -456,7 +456,7 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, PushEventNoServiceWorker) {
|
|
|
| gcm::IncomingMessage message;
|
| message.sender_id = "1234567890";
|
| - message.data["data"] = "testdata";
|
| + message.raw_data = "testdata";
|
| push_service()->OnMessage(app_identifier.app_id(), message);
|
|
|
| callback.WaitUntilSatisfied();
|
| @@ -500,7 +500,7 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest,
|
| gcm::IncomingMessage message;
|
| message.sender_id = "1234567890";
|
| for (int n = 0; n < 2; n++) {
|
| - message.data["data"] = "testdata";
|
| + message.raw_data = "testdata";
|
| SendMessageAndWaitUntilHandled(app_identifier, message);
|
| ASSERT_TRUE(RunScript("resultQueue.pop()", &script_result));
|
| EXPECT_EQ("testdata", script_result);
|
| @@ -515,12 +515,12 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest,
|
| // If the Service Worker push event handler does not show a notification, we
|
| // should show a forced one, but only on the 2nd occurrence since we allow one
|
| // mistake per 10 push events.
|
| - message.data["data"] = "testdata";
|
| + message.raw_data = "testdata";
|
| SendMessageAndWaitUntilHandled(app_identifier, 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";
|
| + message.raw_data = "testdata";
|
| SendMessageAndWaitUntilHandled(app_identifier, message);
|
| ASSERT_TRUE(RunScript("resultQueue.pop()", &script_result, web_contents));
|
| EXPECT_EQ("testdata", script_result);
|
| @@ -536,7 +536,7 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest,
|
|
|
| // The notification will be automatically dismissed when the developer shows
|
| // a new notification themselves at a later point in time.
|
| - message.data["data"] = "shownotification";
|
| + message.raw_data = "shownotification";
|
| SendMessageAndWaitUntilHandled(app_identifier, message);
|
| ASSERT_TRUE(RunScript("resultQueue.pop()", &script_result, web_contents));
|
| EXPECT_EQ("shownotification", script_result);
|
| @@ -554,7 +554,7 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest,
|
|
|
| // However if the Service Worker push event handler shows a notification, we
|
| // should not show a forced one.
|
| - message.data["data"] = "shownotification";
|
| + message.raw_data = "shownotification";
|
| for (int n = 0; n < 9; n++) {
|
| SendMessageAndWaitUntilHandled(app_identifier, message);
|
| ASSERT_TRUE(RunScript("resultQueue.pop()", &script_result, web_contents));
|
| @@ -567,7 +567,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";
|
| + message.raw_data = "testdata";
|
| SendMessageAndWaitUntilHandled(app_identifier, message);
|
| ASSERT_TRUE(RunScript("resultQueue.pop()", &script_result, web_contents));
|
| EXPECT_EQ("testdata", script_result);
|
| @@ -612,10 +612,10 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest,
|
| base::BarrierClosure(2 /* num_closures */,
|
| run_loop.QuitClosure())));
|
|
|
| - message.data["data"] = "testdata";
|
| + message.raw_data = "testdata";
|
| push_service()->OnMessage(app_identifier.app_id(), message);
|
|
|
| - message.data["data"] = "shownotification";
|
| + message.raw_data = "shownotification";
|
| push_service()->OnMessage(app_identifier.app_id(), message);
|
|
|
| run_loop.Run();
|
| @@ -654,7 +654,7 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest,
|
|
|
| gcm::IncomingMessage message;
|
| message.sender_id = "1234567890";
|
| - message.data["data"] = "shownotification-without-waituntil";
|
| + message.raw_data = "shownotification-without-waituntil";
|
| push_service()->OnMessage(app_identifier.app_id(), message);
|
| ASSERT_TRUE(RunScript("resultQueue.pop()", &script_result, web_contents));
|
| EXPECT_EQ("immediate:shownotification-without-waituntil", script_result);
|
|
|