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

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

Issue 8342048: Make NotificationService an interface in the content namespace, and switch callers to use it. Mov... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 | Annotate | Revision Log
OLDNEW
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 "testing/gtest/include/gtest/gtest.h" 5 #include "testing/gtest/include/gtest/gtest.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
11 #include "base/scoped_temp_dir.h" 11 #include "base/scoped_temp_dir.h"
12 #include "chrome/browser/extensions/extension_settings_backend.h" 12 #include "chrome/browser/extensions/extension_settings_backend.h"
13 #include "chrome/browser/extensions/extension_settings_frontend.h" 13 #include "chrome/browser/extensions/extension_settings_frontend.h"
14 #include "chrome/browser/extensions/extension_settings_storage.h" 14 #include "chrome/browser/extensions/extension_settings_storage.h"
15 #include "chrome/common/chrome_notification_types.h" 15 #include "chrome/common/chrome_notification_types.h"
16 #include "chrome/test/base/testing_profile.h" 16 #include "chrome/test/base/testing_profile.h"
17 #include "content/common/notification_service.h"
18 #include "content/public/browser/notification_details.h"
19 #include "content/public/browser/notification_source.h"
20 17
21 class ExtensionSettingsFrontendTest : public testing::Test { 18 class ExtensionSettingsFrontendTest : public testing::Test {
22 public: 19 public:
23 ExtensionSettingsFrontendTest() 20 ExtensionSettingsFrontendTest()
24 : ui_thread_(BrowserThread::UI, MessageLoop::current()), 21 : ui_thread_(BrowserThread::UI, MessageLoop::current()),
25 file_thread_(BrowserThread::FILE, MessageLoop::current()) {} 22 file_thread_(BrowserThread::FILE, MessageLoop::current()) {}
26 23
27 virtual void SetUp() OVERRIDE { 24 virtual void SetUp() OVERRIDE {
28 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); 25 ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
29 frontend_.reset(new ExtensionSettingsFrontend(temp_dir_.path())); 26 frontend_.reset(new ExtensionSettingsFrontend(temp_dir_.path()));
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 ASSERT_FALSE(result.HasError()); 125 ASSERT_FALSE(result.HasError());
129 EXPECT_TRUE(file_util::PathExists(temp_dir_.path())); 126 EXPECT_TRUE(file_util::PathExists(temp_dir_.path()));
130 127
131 frontend_.reset(); 128 frontend_.reset();
132 MessageLoop::current()->RunAllPending(); 129 MessageLoop::current()->RunAllPending();
133 // TODO(kalman): Figure out why this fails, despite appearing to work. 130 // TODO(kalman): Figure out why this fails, despite appearing to work.
134 // Leaving this commented out rather than disabling the whole test so that the 131 // Leaving this commented out rather than disabling the whole test so that the
135 // deletion code paths are at least exercised. 132 // deletion code paths are at least exercised.
136 //EXPECT_FALSE(file_util::PathExists(temp_dir_.path())); 133 //EXPECT_FALSE(file_util::PathExists(temp_dir_.path()));
137 } 134 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_service_unittest.cc ('k') | chrome/browser/extensions/extension_startup_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698