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 #include "base/bind.h" | 5 #include "base/bind.h" |
6 #include "chrome/browser/extensions/app_notification_manager.h" | 6 #include "chrome/browser/extensions/app_notification_manager.h" |
7 #include "chrome/browser/extensions/app_notification_test_util.h" | 7 #include "chrome/browser/extensions/app_notification_test_util.h" |
8 #include "chrome/common/chrome_notification_types.h" | 8 #include "chrome/common/chrome_notification_types.h" |
9 #include "chrome/common/extensions/extension.h" | 9 #include "chrome/common/extensions/extension.h" |
10 #include "chrome/common/extensions/extension_test_util.h" | 10 #include "chrome/common/extensions/extension_test_util.h" |
11 #include "chrome/test/base/testing_profile.h" | 11 #include "chrome/test/base/testing_profile.h" |
12 #include "content/public/browser/notification_details.h" | 12 #include "content/public/browser/notification_details.h" |
13 #include "content/public/browser/notification_service.h" | 13 #include "content/public/browser/notification_service.h" |
14 #include "content/public/browser/notification_source.h" | 14 #include "content/public/browser/notification_source.h" |
15 #include "content/test/test_browser_thread.h" | 15 #include "content/test/test_browser_thread.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
17 | 17 |
| 18 using content::BrowserThread; |
| 19 |
18 namespace util = app_notification_test_util; | 20 namespace util = app_notification_test_util; |
19 | 21 |
20 class AppNotificationManagerTest : public testing::Test { | 22 class AppNotificationManagerTest : public testing::Test { |
21 public: | 23 public: |
22 AppNotificationManagerTest() | 24 AppNotificationManagerTest() |
23 : ui_thread_(BrowserThread::UI, &ui_loop_), | 25 : ui_thread_(BrowserThread::UI, &ui_loop_), |
24 file_thread_(BrowserThread::FILE) {} | 26 file_thread_(BrowserThread::FILE) {} |
25 | 27 |
26 ~AppNotificationManagerTest() {} | 28 ~AppNotificationManagerTest() {} |
27 | 29 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
117 content::NotificationService::current()->Notify( | 119 content::NotificationService::current()->Notify( |
118 chrome::NOTIFICATION_EXTENSION_UNINSTALLED, | 120 chrome::NOTIFICATION_EXTENSION_UNINSTALLED, |
119 content::Source<Profile>(profile_.get()), | 121 content::Source<Profile>(profile_.get()), |
120 content::Details<const std::string>(&id1)); | 122 content::Details<const std::string>(&id1)); |
121 | 123 |
122 // The id1 items should be gone but the id2 items should still be there. | 124 // The id1 items should be gone but the id2 items should still be there. |
123 EXPECT_EQ(NULL, mgr_->GetLast(id1)); | 125 EXPECT_EQ(NULL, mgr_->GetLast(id1)); |
124 EXPECT_EQ(NULL, mgr_->GetAll(id1)); | 126 EXPECT_EQ(NULL, mgr_->GetAll(id1)); |
125 util::ExpectListsEqual(list2, *mgr_->GetAll(id2)); | 127 util::ExpectListsEqual(list2, *mgr_->GetAll(id2)); |
126 } | 128 } |
OLD | NEW |