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

Unified Diff: extensions/browser/api/api_resource_manager_unittest.cc

Issue 431023003: Remove deprecated extension notifications from ApiResourceManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « extensions/browser/api/api_resource_manager.h ('k') | extensions/extensions.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: extensions/browser/api/api_resource_manager_unittest.cc
diff --git a/extensions/browser/api/api_resource_manager_unittest.cc b/extensions/browser/api/api_resource_manager_unittest.cc
index 0a86e0ed00e5ce778105fcca6e1ea6f55db192f0..6747b8e7f8c184fd20e98bf64ec87adab6fd85d9 100644
--- a/extensions/browser/api/api_resource_manager_unittest.cc
+++ b/extensions/browser/api/api_resource_manager_unittest.cc
@@ -4,24 +4,30 @@
#include "base/files/file_path.h"
#include "base/strings/string_util.h"
-#include "chrome/browser/extensions/extension_function_test_utils.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "extensions/browser/api/api_resource.h"
#include "extensions/browser/api/api_resource_manager.h"
+#include "extensions/browser/extensions_test.h"
#include "extensions/common/extension.h"
+#include "extensions/common/id_util.h"
+#include "extensions/common/test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
-namespace utils = extension_function_test_utils;
-
using content::BrowserThread;
+using content::NotificationService;
namespace extensions {
-class ApiResourceManagerUnitTest : public testing::Test {
+class ApiResourceManagerUnitTest : public ExtensionsTest {
+ public:
+ ApiResourceManagerUnitTest()
+ : notification_service_(NotificationService::Create()) {}
+
private:
content::TestBrowserThreadBundle thread_bundle_;
+ scoped_ptr<NotificationService> notification_service_;
};
class FakeApiResource : public ApiResource {
@@ -35,10 +41,10 @@ class FakeApiResource : public ApiResource {
TEST_F(ApiResourceManagerUnitTest, TwoAppsCannotShareResources) {
scoped_ptr<ApiResourceManager<FakeApiResource> > manager(
new ApiResourceManager<FakeApiResource>(NULL));
- scoped_refptr<extensions::Extension> extension_one(
- utils::CreateEmptyExtension("one"));
- scoped_refptr<extensions::Extension> extension_two(
- utils::CreateEmptyExtension("two"));
+ scoped_refptr<extensions::Extension> extension_one =
+ test_util::CreateExtensionWithID("one");
+ scoped_refptr<extensions::Extension> extension_two =
+ test_util::CreateExtensionWithID("two");
const std::string extension_one_id(extension_one->id());
const std::string extension_two_id(extension_two->id());
« no previous file with comments | « extensions/browser/api/api_resource_manager.h ('k') | extensions/extensions.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698