summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test_utils.h
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-01 22:20:44 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-01 22:20:44 +0000
commitcf5912b5bacc1f615416be25b61c7126f06ee403 (patch)
tree7fa99900977e96201105f548599e5991a326b8db /chrome_frame/test_utils.h
parent2a3851ec96ce92e9d51ef2737bf8a7137dad49e3 (diff)
downloadchromium_src-cf5912b5bacc1f615416be25b61c7126f06ee403.zip
chromium_src-cf5912b5bacc1f615416be25b61c7126f06ee403.tar.gz
chromium_src-cf5912b5bacc1f615416be25b61c7126f06ee403.tar.bz2
Added support for running per user chrome frame tests on the relevant ChromeFrame builders.
This includes the chrome_frame_net_tests, chrome_frame_tests and the chrome_frame_unittests test suites. We determine whether per user tests are to be run based on a registry config value PerUserTestBed under HKCU\Software\Google\ChromeFrame. As part of this CL we also register chrome frame in the chrome frame net tests suite. We unregister the chrome frame dll on the builder for per user installs after every test run. BUG=none TEST=Existing chrome frame tests. Review URL: http://codereview.chromium.org/6347056 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@73354 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test_utils.h')
-rw-r--r--chrome_frame/test_utils.h19
1 files changed, 15 insertions, 4 deletions
diff --git a/chrome_frame/test_utils.h b/chrome_frame/test_utils.h
index e0d5c27..f3947c0 100644
--- a/chrome_frame/test_utils.h
+++ b/chrome_frame/test_utils.h
@@ -25,8 +25,14 @@ extern const wchar_t kChromeLauncherExeName[];
// registered chrome frame DLL (e.g. by looking in HKCR) on destruction.
class ScopedChromeFrameRegistrar {
public:
- ScopedChromeFrameRegistrar();
- explicit ScopedChromeFrameRegistrar(const std::wstring& path);
+ enum RegistrationType {
+ PER_USER,
+ SYSTEM_LEVEL,
+ };
+
+ explicit ScopedChromeFrameRegistrar(RegistrationType registration_type);
+ ScopedChromeFrameRegistrar(const std::wstring& path,
+ RegistrationType registration_type);
virtual ~ScopedChromeFrameRegistrar();
void RegisterChromeFrameAtPath(const std::wstring& path);
@@ -36,8 +42,10 @@ class ScopedChromeFrameRegistrar {
std::wstring GetChromeFrameDllPath() const;
static FilePath GetChromeFrameBuildPath();
- static void RegisterAtPath(const std::wstring& path);
- static void UnregisterAtPath(const std::wstring& path);
+ static void RegisterAtPath(const std::wstring& path,
+ RegistrationType registration_type);
+ static void UnregisterAtPath(const std::wstring& path,
+ RegistrationType registration_type);
static void RegisterDefaults();
static FilePath GetReferenceChromeFrameDllPath();
@@ -47,6 +55,9 @@ class ScopedChromeFrameRegistrar {
// Contains the path of the Chrome Frame DLL to be registered at destruction.
std::wstring original_dll_path_;
+
+ // Indicates whether per user or per machine registration is needed.
+ RegistrationType registration_type_;
};
// Callback description for onload, onloaderror, onmessage