diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-09 01:09:28 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-09 01:09:28 +0000 |
commit | 7bc272f38646abb81b58c89a59d8e6842f9e9631 (patch) | |
tree | 8e3c884ad1549c445e86925df673fcd0d8285d1d /chrome_frame/utils.cc | |
parent | 0923559a1a020690c1d199fda3c55f67d2d54335 (diff) | |
download | chromium_src-7bc272f38646abb81b58c89a59d8e6842f9e9631.zip chromium_src-7bc272f38646abb81b58c89a59d8e6842f9e9631.tar.gz chromium_src-7bc272f38646abb81b58c89a59d8e6842f9e9631.tar.bz2 |
Added support for running reliability tests for ChromeFrame on similar lines as Chrome. We only run these
tests for IE at this point. The reliability test code for Chrome has been copied and modified accordingly.
Other related changes in this CL include the following:-
1. If ChromeFrame is running in headless mode determined by a registry value in HKCU\Software\Google\ChromeFrame
we initialize ChromeFrame crash reporting and connect to the Chrome crash server. This would enable us to
gather crash dumps from the reliability test runs and report the same.
2. The LowIntegrity fixes for the WebBrowser which Stoyan had done a while back are only needed for IE7 on Vista.
For this CL though we just do the requisite hacks if the OS is Vista. For Windows7 the returned IWebBrowser
interface pointer works fine.
3. I moved the WebBrowserEventSink to chrome_frame_test_utils as this class is now shared.
Fixes portions of http://code.google.com/p/chromium/issues/detail?id=29451
Bug=29451
Review URL: http://codereview.chromium.org/465074
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34119 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/utils.cc')
-rw-r--r-- | chrome_frame/utils.cc | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/chrome_frame/utils.cc b/chrome_frame/utils.cc index 1edbee9..b97e461 100644 --- a/chrome_frame/utils.cc +++ b/chrome_frame/utils.cc @@ -47,6 +47,10 @@ const wchar_t kDevChannelName[] = L"-dev"; const wchar_t kChromeAttachExternalTabPrefix[] = L"attach_external_tab"; +// Indicates that we are running in a test environment, where execptions, etc +// are handled by the chrome test crash server. +const wchar_t kChromeFrameHeadlessMode[] = L"ChromeFrameHeadlessMode"; + HRESULT UtilRegisterTypeLib(HINSTANCE tlb_instance, LPCOLESTR index, bool for_current_user_only) { @@ -546,6 +550,31 @@ bool GetConfigBool(bool default_value, const wchar_t* value_name) { return (value != FALSE); } +bool SetConfigInt(const wchar_t* value_name, int value) { + RegKey config_key; + if (config_key.Open(HKEY_CURRENT_USER, kChromeFrameConfigKey, + KEY_SET_VALUE)) { + if (config_key.WriteValue(value_name, value)) { + return true; + } + } + + return false; +} + +bool SetConfigBool(const wchar_t* value_name, bool value) { + return SetConfigInt(value_name, value); +} + +bool DeleteConfigValue(const wchar_t* value_name) { + RegKey config_key; + if (config_key.Open(HKEY_CURRENT_USER, kChromeFrameConfigKey, + KEY_WRITE)) { + return config_key.DeleteValue(value_name); + } + return false; +} + bool IsOptInUrl(const wchar_t* url) { RegKey config_key; if (!config_key.Open(HKEY_CURRENT_USER, kChromeFrameConfigKey, KEY_READ)) @@ -667,3 +696,9 @@ bool IsSubFrameRequest(IUnknown* service_provider) { return is_non_top_level_request; } + +bool IsHeadlessMode() { + bool headless = GetConfigBool(false, kChromeFrameHeadlessMode); + return headless; +} + |