| Index: chrome/browser/extensions/extension_function_test_utils.cc
|
| diff --git a/chrome/browser/extensions/extension_function_test_utils.cc b/chrome/browser/extensions/extension_function_test_utils.cc
|
| index 820fbdef1ad6352826554ba5408ce70f2feca731..174748c24e2f70eb0f5fd26a5b9d764c1aa37de3 100644
|
| --- a/chrome/browser/extensions/extension_function_test_utils.cc
|
| +++ b/chrome/browser/extensions/extension_function_test_utils.cc
|
| @@ -105,15 +105,24 @@ scoped_refptr<Extension> CreateEmptyExtension() {
|
|
|
| scoped_refptr<Extension> CreateEmptyExtensionWithLocation(
|
| Extension::Location location) {
|
| + return CreateEmptyExtension(location, std::string());
|
| +}
|
| +
|
| +scoped_refptr<Extension> CreateEmptyExtension(Extension::Location location,
|
| + const std::string& id_input) {
|
| std::string error;
|
| const FilePath test_extension_path;
|
| scoped_ptr<base::DictionaryValue> test_extension_value(
|
| ParseDictionary("{\"name\": \"Test\", \"version\": \"1.0\"}"));
|
| + std::string id;
|
| + if (!id_input.empty())
|
| + CHECK(Extension::GenerateId(id_input, &id));
|
| scoped_refptr<Extension> extension(Extension::Create(
|
| test_extension_path,
|
| location,
|
| *test_extension_value.get(),
|
| Extension::NO_FLAGS,
|
| + id,
|
| &error));
|
| EXPECT_TRUE(error.empty()) << "Could not parse test extension " << error;
|
| return extension;
|
|
|