OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "chrome/browser/browser_process.h" | 5 #include "chrome/browser/browser_process.h" |
6 #include "chrome/browser/extensions/api/notifications/notifications_api.h" | 6 #include "chrome/browser/extensions/api/notifications/notifications_api.h" |
7 #include "chrome/browser/extensions/extension_apitest.h" | 7 #include "chrome/browser/extensions/extension_apitest.h" |
8 #include "chrome/browser/extensions/extension_function_test_utils.h" | 8 #include "chrome/browser/extensions/extension_function_test_utils.h" |
9 #include "chrome/common/chrome_notification_types.h" | 9 #include "chrome/common/chrome_notification_types.h" |
10 #include "chrome/common/chrome_switches.h" | 10 #include "chrome/common/chrome_switches.h" |
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 276 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
277 } | 277 } |
278 | 278 |
279 { | 279 { |
280 ResultCatcher catcher; | 280 ResultCatcher catcher; |
281 g_browser_process->message_center()->SendRemoveNotification( | 281 g_browser_process->message_center()->SendRemoveNotification( |
282 extension->id() + "-BAR", | 282 extension->id() + "-BAR", |
283 true); | 283 true); |
284 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | 284 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); |
285 } | 285 } |
286 | |
287 { | |
288 ResultCatcher catcher; | |
289 g_browser_process->message_center()->SendRemoveAllNotifications(false); | |
290 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | |
291 } | |
292 | |
293 { | |
294 ResultCatcher catcher; | |
295 g_browser_process->message_center()->SendRemoveAllNotifications(true); | |
296 EXPECT_TRUE(catcher.GetNextResult()) << catcher.message(); | |
297 } | |
298 } | 286 } |
299 | 287 |
300 #endif | 288 #endif |
301 #endif | 289 #endif |
OLD | NEW |