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 "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" |
(...skipping 11 matching lines...) Expand all Loading... |
22 namespace util = app_notification_test_util; | 22 namespace util = app_notification_test_util; |
23 | 23 |
24 namespace extensions { | 24 namespace extensions { |
25 | 25 |
26 class AppNotificationManagerTest : public testing::Test { | 26 class AppNotificationManagerTest : public testing::Test { |
27 public: | 27 public: |
28 AppNotificationManagerTest() | 28 AppNotificationManagerTest() |
29 : ui_thread_(BrowserThread::UI, &ui_loop_), | 29 : ui_thread_(BrowserThread::UI, &ui_loop_), |
30 file_thread_(BrowserThread::FILE) {} | 30 file_thread_(BrowserThread::FILE) {} |
31 | 31 |
32 ~AppNotificationManagerTest() {} | 32 virtual ~AppNotificationManagerTest() {} |
33 | 33 |
34 virtual void SetUp() OVERRIDE { | 34 virtual void SetUp() OVERRIDE { |
35 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::UI)); | 35 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::UI)); |
36 file_thread_.Start(); | 36 file_thread_.Start(); |
37 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); | 37 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
38 profile_.reset(new TestingProfile(temp_dir_.path())); | 38 profile_.reset(new TestingProfile(temp_dir_.path())); |
39 InitializeManager(); | 39 InitializeManager(); |
40 } | 40 } |
41 | 41 |
42 virtual void TearDown() OVERRIDE { | 42 virtual void TearDown() OVERRIDE { |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 content::Source<Profile>(profile_.get()), | 123 content::Source<Profile>(profile_.get()), |
124 content::Details<const Extension>(extension1.get())); | 124 content::Details<const Extension>(extension1.get())); |
125 | 125 |
126 // The id1 items should be gone but the id2 items should still be there. | 126 // The id1 items should be gone but the id2 items should still be there. |
127 EXPECT_EQ(NULL, mgr_->GetLast(id1)); | 127 EXPECT_EQ(NULL, mgr_->GetLast(id1)); |
128 EXPECT_EQ(NULL, mgr_->GetAll(id1)); | 128 EXPECT_EQ(NULL, mgr_->GetAll(id1)); |
129 util::ExpectListsEqual(list2, *mgr_->GetAll(id2)); | 129 util::ExpectListsEqual(list2, *mgr_->GetAll(id2)); |
130 } | 130 } |
131 | 131 |
132 } // namespace extensions | 132 } // namespace extensions |
OLD | NEW |