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 99538077849d50df18d55913a63527c233696be1..71e56d49bead00572276b2f7de652fec7d9e303f 100644 |
--- a/chrome/browser/extensions/extension_function_test_utils.cc |
+++ b/chrome/browser/extensions/extension_function_test_utils.cc |
@@ -142,6 +142,24 @@ base::Value* RunFunctionAndReturnResult(UIThreadExtensionFunction* function, |
return function->GetResultValue()->DeepCopy(); |
} |
+bool RunFunctionWithoutResult(UIThreadExtensionFunction* function, |
+ const std::string& args, |
+ Browser* browser) { |
+ return RunFunctionWithoutResult(function, args, browser, NONE); |
+} |
+bool RunFunctionWithoutResult(UIThreadExtensionFunction* function, |
+ const std::string& args, |
+ Browser* browser, |
+ RunFunctionFlags flags) { |
+ scoped_refptr<ExtensionFunction> function_owner(function); |
+ bool success = RunFunction(function, args, browser, flags); |
+ EXPECT_TRUE(function->GetError().empty()) << "Unexpected error: " |
+ << function->GetError(); |
+ EXPECT_FALSE(function->GetResultValue()) << "Unexpected result value: " |
+ << function->GetResult(); |
+ return success; |
+} |
+ |
// This helps us be able to wait until an AsyncExtensionFunction calls |
// SendResponse. |
class SendResponseDelegate |