OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_TEST_UTIL_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_TEST_UTIL_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_TEST_UTIL_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_TEST_UTIL_H_ |
7 #pragma once | |
8 | 7 |
9 #include "chrome/browser/extensions/app_notification.h" | 8 #include "chrome/browser/extensions/app_notification.h" |
10 | 9 |
11 class AppNotificationManager; | 10 class AppNotificationManager; |
12 | 11 |
13 namespace app_notification_test_util { | 12 namespace app_notification_test_util { |
14 | 13 |
15 // Does a deep equality check of two AppNotificationList's, adding a gtest | 14 // Does a deep equality check of two AppNotificationList's, adding a gtest |
16 // failure and logging at the first difference found. | 15 // failure and logging at the first difference found. |
17 void ExpectListsEqual(const AppNotificationList& one, | 16 void ExpectListsEqual(const AppNotificationList& one, |
18 const AppNotificationList& two); | 17 const AppNotificationList& two); |
19 | 18 |
20 // Helper for inserting |count| dummy notifications with |prefix| in their | 19 // Helper for inserting |count| dummy notifications with |prefix| in their |
21 // title and body into |list|. | 20 // title and body into |list|. |
22 void AddNotifications(AppNotificationList* list, | 21 void AddNotifications(AppNotificationList* list, |
23 const std::string& extension_id, | 22 const std::string& extension_id, |
24 int count, | 23 int count, |
25 const std::string& prefix); | 24 const std::string& prefix); |
26 | 25 |
27 // Adds a copy of each item in |list| to |manager|. | 26 // Adds a copy of each item in |list| to |manager|. |
28 bool AddCopiesFromList(AppNotificationManager* manager, | 27 bool AddCopiesFromList(AppNotificationManager* manager, |
29 const AppNotificationList& list); | 28 const AppNotificationList& list); |
30 | 29 |
31 } // namespace app_notification_test_util | 30 } // namespace app_notification_test_util |
32 | 31 |
33 #endif // CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_TEST_UTIL_H_ | 32 #endif // CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_TEST_UTIL_H_ |
OLD | NEW |