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 | 7 |
8 #include "chrome/browser/extensions/app_notification.h" | 8 #include "chrome/browser/extensions/app_notification.h" |
9 | 9 |
| 10 namespace extensions { |
10 class AppNotificationManager; | 11 class AppNotificationManager; |
| 12 } |
11 | 13 |
12 namespace app_notification_test_util { | 14 namespace app_notification_test_util { |
13 | 15 |
14 // Does a deep equality check of two AppNotificationList's, adding a gtest | 16 // Does a deep equality check of two AppNotificationList's, adding a gtest |
15 // failure and logging at the first difference found. | 17 // failure and logging at the first difference found. |
16 void ExpectListsEqual(const AppNotificationList& one, | 18 void ExpectListsEqual(const extensions::AppNotificationList& one, |
17 const AppNotificationList& two); | 19 const extensions::AppNotificationList& two); |
18 | 20 |
19 // Helper for inserting |count| dummy notifications with |prefix| in their | 21 // Helper for inserting |count| dummy notifications with |prefix| in their |
20 // title and body into |list|. | 22 // title and body into |list|. |
21 void AddNotifications(AppNotificationList* list, | 23 void AddNotifications(extensions::AppNotificationList* list, |
22 const std::string& extension_id, | 24 const std::string& extension_id, |
23 int count, | 25 int count, |
24 const std::string& prefix); | 26 const std::string& prefix); |
25 | 27 |
26 // Adds a copy of each item in |list| to |manager|. | 28 // Adds a copy of each item in |list| to |manager|. |
27 bool AddCopiesFromList(AppNotificationManager* manager, | 29 bool AddCopiesFromList(extensions::AppNotificationManager* manager, |
28 const AppNotificationList& list); | 30 const extensions::AppNotificationList& list); |
29 | 31 |
30 } // namespace app_notification_test_util | 32 } // namespace app_notification_test_util |
31 | 33 |
32 #endif // CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_TEST_UTIL_H_ | 34 #endif // CHROME_BROWSER_EXTENSIONS_APP_NOTIFICATION_TEST_UTIL_H_ |
OLD | NEW |