| Index: extensions/common/test_util.cc
|
| diff --git a/extensions/common/test_util.cc b/extensions/common/test_util.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..488fd2116a379d7e0f17479edc7b7c5c6fe51976
|
| --- /dev/null
|
| +++ b/extensions/common/test_util.cc
|
| @@ -0,0 +1,31 @@
|
| +// Copyright 2013 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "extensions/common/test_util.h"
|
| +
|
| +#include "extensions/common/extension.h"
|
| +#include "extensions/common/extension_builder.h"
|
| +#include "extensions/common/value_builder.h"
|
| +
|
| +namespace extensions {
|
| +namespace test_util {
|
| +
|
| +ExtensionBuilder& BuildExtension(ExtensionBuilder& builder) {
|
| + return builder
|
| + .SetManifest(DictionaryBuilder()
|
| + .Set("name", "Test extension")
|
| + .Set("version", "1.0")
|
| + .Set("manifest_version", 2));
|
| +}
|
| +
|
| +scoped_refptr<Extension> CreateExtensionWithID(const std::string& id) {
|
| + return ExtensionBuilder()
|
| + .SetManifest(
|
| + DictionaryBuilder().Set("name", "test").Set("version", "0.1"))
|
| + .SetID(id)
|
| + .Build();
|
| +}
|
| +
|
| +} // namespace test_util
|
| +} // namespace extensions
|
|
|