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