Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(427)

Unified Diff: chrome/browser/extensions/extension_host.h

Issue 150213: Add a ExtensionBrowserTest base class (Closed)
Patch Set: added timeouts fixed other tests Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/extensions/extension_host.h
diff --git a/chrome/browser/extensions/extension_host.h b/chrome/browser/extensions/extension_host.h
index e54fc39be7bb2bb247a4da79aa2597dd17f6f542..a3b04f2cf684037e63e2b9a1a121781f55e77656 100644
--- a/chrome/browser/extensions/extension_host.h
+++ b/chrome/browser/extensions/extension_host.h
@@ -32,6 +32,9 @@ class ExtensionHost : public RenderViewHostDelegate,
public RenderViewHostDelegate::View,
public ExtensionFunctionDispatcher::Delegate {
public:
+ // Enable DOM automation in created render view hosts.
+ static void EnableDOMAutomation() { enable_dom_automation_ = true; }
+
ExtensionHost(Extension* extension, SiteInstance* site_instance,
const GURL& url);
~ExtensionHost();
@@ -104,6 +107,10 @@ class ExtensionHost : public RenderViewHostDelegate,
virtual void UpdatePreferredWidth(int pref_width);
private:
+ // Whether to allow DOM automation for created RenderViewHosts. This is used
+ // for testing.
+ static bool enable_dom_automation_;
+
// ExtensionFunctionDispatcher::Delegate
// If this ExtensionHost has a view, this returns the Browser that view is a
// part of. If this is a global background page, we use the active Browser
« no previous file with comments | « chrome/browser/extensions/extension_browsertests_misc.cc ('k') | chrome/browser/extensions/extension_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698