| Index: chrome/browser/extensions/extension_function_test_utils.cc
|
| diff --git a/chrome/browser/extensions/extension_function_test_utils.cc b/chrome/browser/extensions/extension_function_test_utils.cc
|
| index 2f0fc463ee29eb9800571ef5450584fe8c8c2d86..29097ec354b08029b1d50a8c7f58f6e24db7c581 100644
|
| --- a/chrome/browser/extensions/extension_function_test_utils.cc
|
| +++ b/chrome/browser/extensions/extension_function_test_utils.cc
|
| @@ -130,25 +130,31 @@ std::string RunFunctionAndReturnError(UIThreadExtensionFunction* function,
|
| RunFunctionFlags flags) {
|
| scoped_refptr<ExtensionFunction> function_owner(function);
|
| RunFunction(function, args, browser, flags);
|
| - EXPECT_FALSE(function->GetResultValue()) << "Did not expect a result";
|
| + EXPECT_FALSE(function->GetResultList()) << "Did not expect a result";
|
| return function->GetError();
|
| }
|
|
|
| -base::Value* RunFunctionAndReturnResult(UIThreadExtensionFunction* function,
|
| - const std::string& args,
|
| - Browser* browser) {
|
| - return RunFunctionAndReturnResult(function, args, browser, NONE);
|
| +base::Value* RunFunctionAndReturnSingleResult(
|
| + UIThreadExtensionFunction* function,
|
| + const std::string& args,
|
| + Browser* browser) {
|
| + return RunFunctionAndReturnSingleResult(function, args, browser, NONE);
|
| }
|
| -base::Value* RunFunctionAndReturnResult(UIThreadExtensionFunction* function,
|
| - const std::string& args,
|
| - Browser* browser,
|
| - RunFunctionFlags flags) {
|
| +base::Value* RunFunctionAndReturnSingleResult(
|
| + UIThreadExtensionFunction* function,
|
| + const std::string& args,
|
| + Browser* browser,
|
| + RunFunctionFlags flags) {
|
| scoped_refptr<ExtensionFunction> function_owner(function);
|
| RunFunction(function, args, browser, flags);
|
| EXPECT_TRUE(function->GetError().empty()) << "Unexpected error: "
|
| << function->GetError();
|
| - return (function->GetResultValue() == NULL) ? NULL :
|
| - function->GetResultValue()->DeepCopy();
|
| + base::Value* single_result = NULL;
|
| + if (function->GetResultList() != NULL &&
|
| + function->GetResultList()->Get(0, &single_result)) {
|
| + return single_result->DeepCopy();
|
| + }
|
| + return NULL;
|
| }
|
|
|
| // This helps us be able to wait until an AsyncExtensionFunction calls
|
|
|