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

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

Issue 1622553004: PartitionAlloc: Increase the number of pages per bucket (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/service_worker.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 192cdbacab9748292b60a47e5e3e0ff4f5159f0a..4caad5185dea57a514a2cf05c2ba07d81d0f723e 100644
--- a/chrome/browser/push_messaging/push_messaging_browsertest.cc
+++ b/chrome/browser/push_messaging/push_messaging_browsertest.cc
@@ -484,6 +484,33 @@ IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, PushEventSuccess) {
EXPECT_EQ("testdata", script_result);
}
+IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, PushEventWithoutPayload) {
+ std::string script_result;
+
+ TryToSubscribeSuccessfully("1-0" /* expected_push_subscription_id */);
+
+ PushMessagingAppIdentifier app_identifier =
+ GetAppIdentifierForServiceWorkerRegistration(0LL);
+ EXPECT_EQ(app_identifier.app_id(), gcm_service()->last_registered_app_id());
+ EXPECT_EQ("1234567890", gcm_service()->last_registered_sender_ids()[0]);
+
+ ASSERT_TRUE(RunScript("isControlled()", &script_result));
+ ASSERT_EQ("false - is not controlled", script_result);
+
+ LoadTestPage(); // Reload to become controlled.
+
+ ASSERT_TRUE(RunScript("isControlled()", &script_result));
+ ASSERT_EQ("true - is controlled", script_result);
+
+ gcm::IncomingMessage message;
+ message.sender_id = "1234567890";
+ message.decrypted = false;
+
+ push_service()->OnMessage(app_identifier.app_id(), message);
+ ASSERT_TRUE(RunScript("resultQueue.pop()", &script_result));
+ EXPECT_EQ("[NULL]", script_result);
+}
+
IN_PROC_BROWSER_TEST_F(PushMessagingBrowserTest, PushEventNoServiceWorker) {
std::string script_result;
« no previous file with comments | « no previous file | chrome/test/data/push_messaging/service_worker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698