| Index: extensions/browser/api_test_utils.h
|
| diff --git a/extensions/browser/api_test_utils.h b/extensions/browser/api_test_utils.h
|
| index 119b090cdee7d47663d125241ec2b0e34ead30a0..703a231ad5ef2db6690b60671a9a4e5313a0867d 100644
|
| --- a/extensions/browser/api_test_utils.h
|
| +++ b/extensions/browser/api_test_utils.h
|
| @@ -7,7 +7,9 @@
|
|
|
| #include <string>
|
|
|
| +#include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
| +#include "extensions/common/extension.h"
|
|
|
| class UIThreadExtensionFunction;
|
|
|
| @@ -28,6 +30,10 @@ namespace api_test_utils {
|
|
|
| enum RunFunctionFlags { NONE = 0, INCLUDE_INCOGNITO = 1 << 0 };
|
|
|
| +// Creates an extension instance that can be attached to an ExtensionFunction
|
| +// before running it.
|
| +scoped_refptr<Extension> CreateEmptyExtension();
|
| +
|
| // Run |function| with |args| and return the result. Adds an error to the
|
| // current test if |function| returns an error. Takes ownership of
|
| // |function|. The caller takes ownership of the result.
|
| @@ -43,6 +49,18 @@ base::Value* RunFunctionAndReturnSingleResult(
|
| scoped_ptr<ExtensionFunctionDispatcher> dispatcher,
|
| RunFunctionFlags flags);
|
|
|
| +// RunFunctionAndReturnSingleResult, except with a NULL implementation of the
|
| +// Delegate.
|
| +base::Value* RunDelegatelessFunctionAndReturnSingleResult(
|
| + UIThreadExtensionFunction* function,
|
| + const std::string& args,
|
| + content::BrowserContext* context);
|
| +base::Value* RunDelegatelessFunctionAndReturnSingleResult(
|
| + UIThreadExtensionFunction* function,
|
| + const std::string& args,
|
| + content::BrowserContext* context,
|
| + RunFunctionFlags flags);
|
| +
|
| // Create and run |function| with |args|. Works with both synchronous and async
|
| // functions. Ownership of |function| remains with the caller.
|
| //
|
|
|