1 // Copyright 2013 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_SYNC_NOTIFIER_TEST_UTILS_H_ 6 #define CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_SYNC_NOTIFIER_TEST_UTILS_H_ 7 8 #include <string> 9 10 #include "base/basictypes.h" 11 #include "sync/api/sync_data.h" 12 #include "sync/protocol/sync.pb.h" 13 #include "sync/protocol/synced_notification_specifics.pb.h" 14 15 16 // Fake data for creating a SyncedNotification. 17 extern const char kAppId1[]; 18 extern const char kAppId2[]; 19 extern const char kAppId3[]; 20 extern const char kAppId4[]; 21 extern const char kAppId5[]; 22 extern const char kAppId6[]; 23 extern const char kAppId7[]; 24 extern const char kKey1[]; 25 extern const char kKey2[]; 26 extern const char kKey3[]; 27 extern const char kKey4[]; 28 extern const char kKey5[]; 29 extern const char kKey6[]; 30 extern const char kKey7[]; 31 extern const char kIconUrl1[]; 32 extern const char kIconUrl2[]; 33 extern const char kIconUrl3[]; 34 extern const char kIconUrl4[]; 35 extern const char kIconUrl5[]; 36 extern const char kIconUrl6[]; 37 extern const char kIconUrl7[]; 38 extern const char kTitle1[]; 39 extern const char kTitle2[]; 40 extern const char kTitle3[]; 41 extern const char kTitle4[]; 42 extern const char kTitle5[]; 43 extern const char kTitle6[]; 44 extern const char kTitle7[]; 45 extern const char kText1[]; 46 extern const char kText2[]; 47 extern const char kText3[]; 48 extern const char kText4[]; 49 extern const char kText5[]; 50 extern const char kText6[]; 51 extern const char kText7[]; 52 extern const char kText1And1[]; 53 extern const char kImageUrl1[]; 54 extern const char kImageUrl2[]; 55 extern const char kImageUrl3[]; 56 extern const char kImageUrl4[]; 57 extern const char kImageUrl5[]; 58 extern const char kImageUrl6[]; 59 extern const char kImageUrl7[]; 60 extern const char kExpectedOriginUrl[]; 61 extern const char kDefaultDestinationTitle[]; 62 extern const char kDefaultDestinationIconUrl[]; 63 extern const char kDefaultDestinationUrl[]; 64 extern const char kButtonOneTitle[]; 65 extern const char kButtonOneIconUrl[]; 66 extern const char kButtonOneUrl[]; 67 extern const char kButtonTwoTitle[]; 68 extern const char kButtonTwoIconUrl[]; 69 extern const char kButtonTwoUrl[]; 70 extern const char kContainedTitle1[]; 71 extern const char kContainedTitle2[]; 72 extern const char kContainedTitle3[]; 73 extern const char kContainedMessage1[]; 74 extern const char kContainedMessage2[]; 75 extern const char kContainedMessage3[]; 76 const uint64 kFakeCreationTime = 42; 77 const int kProtobufPriority = static_cast<int>( 78 sync_pb::CoalescedSyncedNotification_Priority_LOW); 79 80 const sync_pb::CoalescedSyncedNotification_ReadState kRead = 81 sync_pb::CoalescedSyncedNotification_ReadState_READ; 82 const sync_pb::CoalescedSyncedNotification_ReadState kDismissed = 83 sync_pb::CoalescedSyncedNotification_ReadState_DISMISSED; 84 const sync_pb::CoalescedSyncedNotification_ReadState kUnread = 85 sync_pb::CoalescedSyncedNotification_ReadState_UNREAD; 86 87 // This function builds the sync data object we use to create a testing 88 // notification. 89 syncer::SyncData CreateSyncData( 90 const std::string& title, 91 const std::string& text, 92 const std::string& app_icon_url, 93 const std::string& image_url, 94 const std::string& app_id, 95 const std::string& key, 96 const sync_pb::CoalescedSyncedNotification_ReadState read_state); 97 98 #endif // CHROME_BROWSER_NOTIFICATIONS_SYNC_NOTIFIER_SYNC_NOTIFIER_TEST_UTILS_H_ 99