Index: extensions/browser/api_test_utils.h |
diff --git a/extensions/browser/api_test_utils.h b/extensions/browser/api_test_utils.h |
index 312815331c3033be19fa4edb18dc4ed46e5dbb92..cdf08ce2170e5faafd8a56edb5f5ee9878503fab 100644 |
--- a/extensions/browser/api_test_utils.h |
+++ b/extensions/browser/api_test_utils.h |
@@ -59,6 +59,17 @@ base::Value* RunFunctionAndReturnSingleResult( |
content::BrowserContext* context, |
RunFunctionFlags flags); |
+// Run |function| with |args| and return the resulting error. Adds an error to |
+// the current test if |function| returns a result. Takes ownership of |
+// |function|. |
+std::string RunFunctionAndReturnError(UIThreadExtensionFunction* function, |
+ const std::string& args, |
+ content::BrowserContext* context, |
+ RunFunctionFlags flags); |
+std::string RunFunctionAndReturnError(UIThreadExtensionFunction* function, |
+ const std::string& args, |
+ content::BrowserContext* context); |
+ |
// Create and run |function| with |args|. Works with both synchronous and async |
// functions. Ownership of |function| remains with the caller. |
// |