summaryrefslogtreecommitdiffstats
path: root/extensions/common/test_util.h
diff options
context:
space:
mode:
authorjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-07 21:28:49 +0000
committerjamescook@chromium.org <jamescook@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-01-07 21:28:49 +0000
commitf971f9cabdcf9aaa46c12f598fa15241d2fa47cf (patch)
tree32ffcfaacd2ec52e67081e2032242578e698dabc /extensions/common/test_util.h
parentaf01a3b5c3fe0471bde8425b618113ba5717853a (diff)
downloadchromium_src-f971f9cabdcf9aaa46c12f598fa15241d2fa47cf.zip
chromium_src-f971f9cabdcf9aaa46c12f598fa15241d2fa47cf.tar.gz
chromium_src-f971f9cabdcf9aaa46c12f598fa15241d2fa47cf.tar.bz2
Create extensions_test_support build target
* Create extensions/common/test_util.h for shared test code * Consolidate duplicated CreateExtensionWithID() functions * Create extensions_test_support build target because you can't have multiple files named test_util.h in a single build target on MSVS, all the other names are taken (test_utils.h, extension_test_util.h, etc.), and this gets us a step closer to having an extensions-only test suite. * Fix some missing dependencies for the extensions_common target * Remove unnecessary includes that create a dependency on themes BUG=none TEST=compiles, unit_tests TBR=thakis@chromium.org for mechanical changes to chrome/browser/ui/cocoa/extensions/ Review URL: https://codereview.chromium.org/110463003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243382 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'extensions/common/test_util.h')
-rw-r--r--extensions/common/test_util.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/extensions/common/test_util.h b/extensions/common/test_util.h
new file mode 100644
index 0000000..e38b28f
--- /dev/null
+++ b/extensions/common/test_util.h
@@ -0,0 +1,27 @@
+// Copyright 2014 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.
+
+#ifndef EXTENSIONS_COMMON_TEST_UTIL_H_
+#define EXTENSIONS_COMMON_TEST_UTIL_H_
+
+#include <string>
+
+#include "base/memory/ref_counted.h"
+
+namespace extensions {
+class Extension;
+class ExtensionBuilder;
+
+namespace test_util {
+
+// Adds an extension manifest to a builder.
+ExtensionBuilder& BuildExtension(ExtensionBuilder& builder);
+
+// Return a very simple extension with a given |id|.
+scoped_refptr<Extension> CreateExtensionWithID(const std::string& id);
+
+} // namespace test_util
+} // namespace extensions
+
+#endif // EXTENSIONS_COMMON_TEST_UTIL_H_