diff options
author | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-23 19:16:20 +0000 |
---|---|---|
committer | joi@chromium.org <joi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-23 19:16:20 +0000 |
commit | 50f53164ebbceb30b69578e96e863375f5cb4f9b (patch) | |
tree | 853541075c0a2ac5adb3d4f3a389401d92405edf /chrome_frame/chrome_frame_plugin.h | |
parent | 117fd71c37c932c5ffcbf59eb42d118d3dfb431f (diff) | |
download | chromium_src-50f53164ebbceb30b69578e96e863375f5cb4f9b.zip chromium_src-50f53164ebbceb30b69578e96e863375f5cb4f9b.tar.gz chromium_src-50f53164ebbceb30b69578e96e863375f5cb4f9b.tar.bz2 |
Enhance extension UI testing by enabling you to select which extension
APIs to forward (and thus stub out in your test), while others will
keep being fulfilled as per usual. This lets you build tests that
stub out one piece of behavior while testing that some side effects of
another API happen as expected.
BUG=none
TEST=Run ui_tests.exe
Review URL: http://codereview.chromium.org/314015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29919 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_plugin.h')
-rw-r--r-- | chrome_frame/chrome_frame_plugin.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome_frame/chrome_frame_plugin.h b/chrome_frame/chrome_frame_plugin.h index b0814bb..fbc3f77 100644 --- a/chrome_frame/chrome_frame_plugin.h +++ b/chrome_frame/chrome_frame_plugin.h @@ -19,6 +19,7 @@ class ChromeFramePlugin : public ChromeFrameDelegateImpl { ChromeFramePlugin() : ignore_setfocus_(false), is_privileged_(false) { + functions_enabled_.push_back("*"); } ~ChromeFramePlugin() { Uninitialize(); @@ -78,7 +79,7 @@ END_MSG_MAP() // Issue the extension automation request if we're privileged to // allow this control to handle extension requests from Chrome. if (is_privileged_) - automation_client_->SetEnableExtensionAutomation(true); + automation_client_->SetEnableExtensionAutomation(functions_enabled_); } virtual bool IsValid() const { @@ -170,7 +171,7 @@ END_MSG_MAP() // modified as well (enable/disable commands, add/remove items). // Override in most-derived class if needed. bool PreProcessContextMenu(HMENU menu) { - // Add an "About" item. + // Add an "About" item. // TODO: The string should be localized and menu should // be modified in ExternalTabContainer:: once we go public. AppendMenu(menu, MF_STRING, IDC_ABOUT_CHROME_FRAME, @@ -208,6 +209,10 @@ END_MSG_MAP() // // When privileged, additional interfaces are made available to the user. bool is_privileged_; + + // List of functions to enable for automation, or a single entry "*" to enable + // all functions for automation. Ignored unless is_privileged_ is true. + std::vector<std::string> functions_enabled_; }; #endif // CHROME_FRAME_CHROME_FRAME_PLUGIN_H_ |