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

Unified Diff: chrome/common/extensions/extension_test_util.cc

Issue 110463003: Create extensions_test_support build target (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase extension_test_util Created 6 years, 11 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 | « chrome/common/extensions/extension_test_util.h ('k') | extensions/browser/extension_registry_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/common/extensions/extension_test_util.cc
diff --git a/chrome/common/extensions/extension_test_util.cc b/chrome/common/extensions/extension_test_util.cc
index dd1215b8662a86305b389c0cde804b73b99f4781..e30dd15a8a54b08ce0f696d42b17691882f712fd 100644
--- a/chrome/common/extensions/extension_test_util.cc
+++ b/chrome/common/extensions/extension_test_util.cc
@@ -10,49 +10,14 @@
#include "base/values.h"
#include "chrome/common/chrome_paths.h"
#include "extensions/common/extension.h"
-#include "extensions/common/extension_builder.h"
#include "extensions/common/manifest_constants.h"
#include "testing/gtest/include/gtest/gtest.h"
-using extensions::DictionaryBuilder;
using extensions::Extension;
-using extensions::ExtensionBuilder;
-using extensions::ListBuilder;
using extensions::Manifest;
-namespace extensions {
namespace extension_test_util {
-ExtensionBuilder& BuildExtension(ExtensionBuilder& builder) {
- return builder
- .SetManifest(DictionaryBuilder()
- .Set("name", "Test extension")
- .Set("version", "1.0")
- .Set("manifest_version", 2));
-}
-
-ExtensionBuilder& BuildExtensionWithPermissions(ExtensionBuilder& builder,
- ListBuilder& permissions) {
- return
- BuildExtension(builder)
- .MergeManifest(
- DictionaryBuilder().Set("permissions", permissions));
-}
-
-} // namespace extension_test_util
-} // namespace extensions
-
-namespace extension_test_util {
-
-scoped_refptr<Extension> CreateExtensionWithID(std::string id) {
- base::DictionaryValue values;
- values.SetString(extensions::manifest_keys::kName, "test");
- values.SetString(extensions::manifest_keys::kVersion, "0.1");
- std::string error;
- return Extension::Create(base::FilePath(), extensions::Manifest::INTERNAL,
- values, Extension::NO_FLAGS, id, &error);
-}
-
scoped_refptr<Extension> LoadManifestUnchecked(const std::string& dir,
const std::string& test_file,
Manifest::Location location,
« no previous file with comments | « chrome/common/extensions/extension_test_util.h ('k') | extensions/browser/extension_registry_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698