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

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

Issue 1140873005: Push API: Avoid false positive DCHECK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add test Created 5 years, 7 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 | « chrome/browser/push_messaging/push_messaging_app_identifier.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/push_messaging/push_messaging_app_identifier_unittest.cc
diff --git a/chrome/browser/push_messaging/push_messaging_app_identifier_unittest.cc b/chrome/browser/push_messaging/push_messaging_app_identifier_unittest.cc
index 0275b2bba05d7b905f9d0d3ed3ed535df6ce9fcd..862c7dc827b4c387fc9136fc5e1ec42ccf8ddcc3 100644
--- a/chrome/browser/push_messaging/push_messaging_app_identifier_unittest.cc
+++ b/chrome/browser/push_messaging/push_messaging_app_identifier_unittest.cc
@@ -76,6 +76,13 @@ TEST_F(PushMessagingAppIdentifierTest, UniqueGuids) {
GURL("https://www.example.com/"), 1).app_id());
}
+TEST_F(PushMessagingAppIdentifierTest, FindInvalidAppId) {
+ // These calls to FindByAppId should not DCHECK.
+ EXPECT_TRUE(PushMessagingAppIdentifier::FindByAppId(profile(), "").is_null());
+ EXPECT_TRUE(PushMessagingAppIdentifier::FindByAppId(
+ profile(), "amhfneadkjmnlefnpidcijoldiibcdnd").is_null());
+}
+
TEST_F(PushMessagingAppIdentifierTest, PersistAndFind) {
ASSERT_TRUE(PushMessagingAppIdentifier::FindByAppId(
profile(), original_.app_id()).is_null());
« no previous file with comments | « chrome/browser/push_messaging/push_messaging_app_identifier.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698