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..6d7e7d3b214d648bb66a1a0fbab9c10cc2682336 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->GetResultsListValue()) << "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; |
Aaron Boodman
2012/07/09 04:39:31
initialize primitives
Matt Tytel
2012/07/10 18:50:45
Done.
|
+ if (function->GetResultsListValue() != NULL && |
+ function->GetResultsListValue()->Get(0, &single_result)) { |
+ return single_result->DeepCopy(); |
+ } |
+ return NULL; |
} |
// This helps us be able to wait until an AsyncExtensionFunction calls |