Index: extensions/browser/api_unittest.h |
diff --git a/extensions/browser/api_unittest.h b/extensions/browser/api_unittest.h |
index 2b1c46854f0b2bb161a9a101dced70cd1fafb5f8..7c7cad79acfc027ec470af591dfbdb4db5eb42d4 100644 |
--- a/extensions/browser/api_unittest.h |
+++ b/extensions/browser/api_unittest.h |
@@ -22,6 +22,7 @@ class ListValue; |
namespace content { |
class NotificationService; |
class TestBrowserThreadBundle; |
+class WebContents; |
} |
class UIThreadExtensionFunction; |
@@ -39,6 +40,7 @@ class ApiUnitTest : public ExtensionsTest { |
ApiUnitTest(); |
~ApiUnitTest() override; |
+ content::WebContents* contents() { return contents_.get(); } |
const Extension* extension() const { return extension_.get(); } |
scoped_refptr<Extension> extension_ref() { return extension_; } |
void set_extension(scoped_refptr<Extension> extension) { |
@@ -49,6 +51,10 @@ class ApiUnitTest : public ExtensionsTest { |
// SetUp creates and loads an empty, unpacked Extension. |
void SetUp() override; |
+ // Creates WebContents for |extension_| that can be used in API calls. |
+ // If |contents_| is already set, this does nothing. |
+ void CreateWebContents(); |
James Cook
2015/01/17 00:51:29
Is there any particular reason not to call this Cr
babu
2015/01/17 11:53:56
Done.
Changed to the original name and removed t
|
+ |
// Various ways of running an API function. These methods take ownership of |
// |function|. |args| should be in JSON format, wrapped in a list. |
// See also the RunFunction* methods in extension_function_test_utils.h. |
@@ -87,6 +93,10 @@ class ApiUnitTest : public ExtensionsTest { |
MockExtensionSystemFactory<MockExtensionSystem> extension_system_factory_; |
+ // The WebContents used to associate a RenderViewHost with API function calls, |
+ // or NULL. |
James Cook
2015/01/17 00:51:29
nit: "null" in comments, since we don't use the NU
babu
2015/01/17 11:53:56
Done.
|
+ scoped_ptr<content::WebContents> contents_; |
+ |
// The Extension used when running API function calls. |
scoped_refptr<Extension> extension_; |
}; |