Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Side by Side Diff: chrome/browser/extensions/app_notification_manager_unittest.cc

Issue 10830036: Moved the AppNotification system into extensions namespace (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Latest master for cq Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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"
11 #include "chrome/common/extensions/extension_manifest_constants.h" 11 #include "chrome/common/extensions/extension_manifest_constants.h"
12 #include "chrome/common/extensions/extension_test_util.h" 12 #include "chrome/common/extensions/extension_test_util.h"
13 #include "chrome/test/base/testing_profile.h" 13 #include "chrome/test/base/testing_profile.h"
14 #include "content/public/browser/notification_details.h" 14 #include "content/public/browser/notification_details.h"
15 #include "content/public/browser/notification_service.h" 15 #include "content/public/browser/notification_service.h"
16 #include "content/public/browser/notification_source.h" 16 #include "content/public/browser/notification_source.h"
17 #include "content/public/test/test_browser_thread.h" 17 #include "content/public/test/test_browser_thread.h"
18 #include "testing/gtest/include/gtest/gtest.h" 18 #include "testing/gtest/include/gtest/gtest.h"
19 19
20 using content::BrowserThread; 20 using content::BrowserThread;
21 using extensions::Extension;
22 21
23 namespace util = app_notification_test_util; 22 namespace util = app_notification_test_util;
24 23
24 namespace extensions {
25
25 class AppNotificationManagerTest : public testing::Test { 26 class AppNotificationManagerTest : public testing::Test {
26 public: 27 public:
27 AppNotificationManagerTest() 28 AppNotificationManagerTest()
28 : ui_thread_(BrowserThread::UI, &ui_loop_), 29 : ui_thread_(BrowserThread::UI, &ui_loop_),
29 file_thread_(BrowserThread::FILE) {} 30 file_thread_(BrowserThread::FILE) {}
30 31
31 ~AppNotificationManagerTest() {} 32 ~AppNotificationManagerTest() {}
32 33
33 virtual void SetUp() OVERRIDE { 34 virtual void SetUp() OVERRIDE {
34 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::UI)); 35 ASSERT_TRUE(BrowserThread::CurrentlyOn(BrowserThread::UI));
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 content::NotificationService::current()->Notify( 121 content::NotificationService::current()->Notify(
121 chrome::NOTIFICATION_EXTENSION_UNINSTALLED, 122 chrome::NOTIFICATION_EXTENSION_UNINSTALLED,
122 content::Source<Profile>(profile_.get()), 123 content::Source<Profile>(profile_.get()),
123 content::Details<const Extension>(extension1.get())); 124 content::Details<const Extension>(extension1.get()));
124 125
125 // 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.
126 EXPECT_EQ(NULL, mgr_->GetLast(id1)); 127 EXPECT_EQ(NULL, mgr_->GetLast(id1));
127 EXPECT_EQ(NULL, mgr_->GetAll(id1)); 128 EXPECT_EQ(NULL, mgr_->GetAll(id1));
128 util::ExpectListsEqual(list2, *mgr_->GetAll(id2)); 129 util::ExpectListsEqual(list2, *mgr_->GetAll(id2));
129 } 130 }
131
132 } // namespace extensions
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698