1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "extensions/common/test_util.h"
7 #include "extensions/common/extension.h"
8 #include "extensions/common/extension_builder.h"
9 #include "extensions/common/value_builder.h"
11 namespace extensions
{
14 ExtensionBuilder
& BuildExtension(ExtensionBuilder
& builder
) {
16 .SetManifest(DictionaryBuilder()
17 .Set("name", "Test extension")
18 .Set("version", "1.0")
19 .Set("manifest_version", 2));
22 ExtensionBuilder
& BuildApp(ExtensionBuilder
& builder
) {
23 return builder
.SetManifest(
25 .Set("name", "Test extension")
26 .Set("version", "1.0")
27 .Set("manifest_version", 2)
29 extensions::DictionaryBuilder().Set(
31 extensions::DictionaryBuilder().Set(
33 extensions::ListBuilder().Append("background.js")))));
36 scoped_refptr
<Extension
> CreateEmptyExtension() {
37 return ExtensionBuilder()
39 DictionaryBuilder().Set("name", "Test").Set("version", "1.0"))
43 scoped_refptr
<Extension
> CreateEmptyExtension(const std::string
& id
) {
44 return ExtensionBuilder()
46 DictionaryBuilder().Set("name", "test").Set("version", "0.1"))
51 } // namespace test_util
52 } // namespace extensions