| Index: extensions/browser/api_test_utils.cc
|
| diff --git a/extensions/browser/api_test_utils.cc b/extensions/browser/api_test_utils.cc
|
| index b18b249e58dd560a405d6e61a9753faae0c4e366..1c70b27bccda89f4ad4b16ecd98534db5dece4a0 100644
|
| --- a/extensions/browser/api_test_utils.cc
|
| +++ b/extensions/browser/api_test_utils.cc
|
| @@ -137,12 +137,21 @@ bool RunFunction(UIThreadExtensionFunction* function,
|
| content::BrowserContext* context,
|
| scoped_ptr<extensions::ExtensionFunctionDispatcher> dispatcher,
|
| RunFunctionFlags flags) {
|
| - SendResponseDelegate response_delegate;
|
| - function->set_test_delegate(&response_delegate);
|
| scoped_ptr<base::ListValue> parsed_args(ParseList(args));
|
| EXPECT_TRUE(parsed_args.get())
|
| << "Could not parse extension function arguments: " << args;
|
| - function->SetArgs(parsed_args.get());
|
| + return RunFunction(
|
| + function, parsed_args.Pass(), context, dispatcher.Pass(), flags);
|
| +}
|
| +
|
| +bool RunFunction(UIThreadExtensionFunction* function,
|
| + scoped_ptr<base::ListValue> args,
|
| + content::BrowserContext* context,
|
| + scoped_ptr<extensions::ExtensionFunctionDispatcher> dispatcher,
|
| + RunFunctionFlags flags) {
|
| + SendResponseDelegate response_delegate;
|
| + function->set_test_delegate(&response_delegate);
|
| + function->SetArgs(args.get());
|
|
|
| CHECK(dispatcher);
|
| function->set_dispatcher(dispatcher->AsWeakPtr());
|
|
|