diff options
Diffstat (limited to 'chrome_frame/test')
-rw-r--r-- | chrome_frame/test/chrome_frame_test_utils.cc | 8 | ||||
-rw-r--r-- | chrome_frame/test/chrome_frame_test_utils.h | 3 | ||||
-rw-r--r-- | chrome_frame/test/net/fake_external_tab.cc | 4 | ||||
-rw-r--r-- | chrome_frame/test/perf/chrome_frame_perftest.cc | 15 | ||||
-rw-r--r-- | chrome_frame/test/perf/run_all.cc | 3 | ||||
-rw-r--r-- | chrome_frame/test/reliability/run_all_unittests.cc | 3 | ||||
-rw-r--r-- | chrome_frame/test/run_all_unittests.cc | 6 | ||||
-rw-r--r-- | chrome_frame/test/test_with_web_server.cc | 6 |
8 files changed, 36 insertions, 12 deletions
diff --git a/chrome_frame/test/chrome_frame_test_utils.cc b/chrome_frame/test/chrome_frame_test_utils.cc index 85ecc5b..17f4483 100644 --- a/chrome_frame/test/chrome_frame_test_utils.cc +++ b/chrome_frame/test/chrome_frame_test_utils.cc @@ -672,4 +672,12 @@ bool KillProcesses(const std::wstring& executable_name, int exit_code, return result; } +ScopedChromeFrameRegistrar::RegistrationType GetTestBedType() { + if (GetConfigBool(false, L"PerUserTestBed")) { + return ScopedChromeFrameRegistrar::PER_USER; + } else { + return ScopedChromeFrameRegistrar::SYSTEM_LEVEL; + } +} + } // namespace chrome_frame_test diff --git a/chrome_frame/test/chrome_frame_test_utils.h b/chrome_frame/test/chrome_frame_test_utils.h index cc3d2be..3715f88f 100644 --- a/chrome_frame/test/chrome_frame_test_utils.h +++ b/chrome_frame/test/chrome_frame_test_utils.h @@ -328,6 +328,9 @@ class ScopedVirtualizeHklmAndHkcu { bool KillProcesses(const std::wstring& executable_name, int exit_code, bool wait); +// Returns the type of test bed, PER_USER or SYSTEM_LEVEL. +ScopedChromeFrameRegistrar::RegistrationType GetTestBedType(); + } // namespace chrome_frame_test // TODO(tommi): This is a temporary workaround while we're getting our diff --git a/chrome_frame/test/net/fake_external_tab.cc b/chrome_frame/test/net/fake_external_tab.cc index 5b69f3a..0a3e584 100644 --- a/chrome_frame/test/net/fake_external_tab.cc +++ b/chrome_frame/test/net/fake_external_tab.cc @@ -38,6 +38,7 @@ #include "chrome_frame/test/chrome_frame_test_utils.h" #include "chrome_frame/test/net/test_automation_resource_message_filter.h" #include "chrome_frame/test/simulate_input.h" +#include "chrome_frame/test_utils.h" #include "chrome_frame/test/win_event_receiver.h" #include "chrome_frame/utils.h" #include "testing/gtest/include/gtest/gtest.h" @@ -501,6 +502,9 @@ int main(int argc, char** argv) { LOG(INFO) << "Not running ChromeFrame net tests on IE9"; return 0; } + + ScopedChromeFrameRegistrar registrar(chrome_frame_test::GetTestBedType()); + WindowWatchdog watchdog; // See url_request_unittest.cc for these credentials. SupplyProxyCredentials credentials("user", "secret"); diff --git a/chrome_frame/test/perf/chrome_frame_perftest.cc b/chrome_frame/test/perf/chrome_frame_perftest.cc index 2f645d2..e83bf65 100644 --- a/chrome_frame/test/perf/chrome_frame_perftest.cc +++ b/chrome_frame/test/perf/chrome_frame_perftest.cc @@ -389,7 +389,8 @@ class ChromeFrameStartupTestActiveX : public ChromeFrameStartupTest { public: virtual void SetUp() { // Register the Chrome Frame DLL in the build directory. - chrome_frame_registrar_.reset(new ScopedChromeFrameRegistrar); + chrome_frame_registrar_.reset(new ScopedChromeFrameRegistrar( + ScopedChromeFrameRegistrar::SYSTEM_LEVEL)); ChromeFrameStartupTest::SetUp(); } @@ -457,7 +458,8 @@ class ChromeFrameStartupTestActiveXReference // override the browser directory to use the reference build instead. virtual void SetUp() { // Register the reference build Chrome Frame DLL. - chrome_frame_registrar_.reset(new ScopedChromeFrameRegistrar); + chrome_frame_registrar_.reset(new ScopedChromeFrameRegistrar( + ScopedChromeFrameRegistrar::SYSTEM_LEVEL)); chrome_frame_registrar_->RegisterReferenceChromeFrameBuild(); ChromeFrameStartupTest::SetUp(); @@ -567,7 +569,8 @@ class ChromeFrameMemoryTest : public ChromeFramePerfTestBase { virtual void SetUp() { // Register the Chrome Frame DLL in the build directory. - chrome_frame_registrar_.reset(new ScopedChromeFrameRegistrar); + chrome_frame_registrar_.reset(new ScopedChromeFrameRegistrar( + ScopedChromeFrameRegistrar::SYSTEM_LEVEL)); } void RunTest(const char* test_name, char* urls[], int total_urls) { @@ -748,7 +751,8 @@ class ChromeFrameMemoryTest : public ChromeFramePerfTestBase { class ChromeFrameMemoryTestReference : public ChromeFrameMemoryTest { public: virtual void SetUp() { - chrome_frame_registrar_.reset(new ScopedChromeFrameRegistrar); + chrome_frame_registrar_.reset(new ScopedChromeFrameRegistrar( + ScopedChromeFrameRegistrar::SYSTEM_LEVEL)); chrome_frame_registrar_->RegisterReferenceChromeFrameBuild(); } @@ -872,7 +876,8 @@ class ChromeFrameCreationTestReference : public ChromeFrameCreationTest { public: // override the browser directory to use the reference build instead. virtual void SetUp() { - chrome_frame_registrar_.reset(new ScopedChromeFrameRegistrar); + chrome_frame_registrar_.reset(new ScopedChromeFrameRegistrar( + ScopedChromeFrameRegistrar::SYSTEM_LEVEL)); chrome_frame_registrar_->RegisterReferenceChromeFrameBuild(); ChromeFrameStartupTest::SetUp(); } diff --git a/chrome_frame/test/perf/run_all.cc b/chrome_frame/test/perf/run_all.cc index 7d66299..3b29280 100644 --- a/chrome_frame/test/perf/run_all.cc +++ b/chrome_frame/test/perf/run_all.cc @@ -28,7 +28,8 @@ int main(int argc, char **argv) { // Use ctor/raii to register the local Chrome Frame dll. scoped_ptr<ScopedChromeFrameRegistrar> registrar( - new ScopedChromeFrameRegistrar); + new ScopedChromeFrameRegistrar( + ScopedChromeFrameRegistrar::SYSTEM_LEVEL)); int ret = perf_suite.Run(); DeleteConfigValue(kChromeFrameHeadlessMode); diff --git a/chrome_frame/test/reliability/run_all_unittests.cc b/chrome_frame/test/reliability/run_all_unittests.cc index 26510e5..d5b42da 100644 --- a/chrome_frame/test/reliability/run_all_unittests.cc +++ b/chrome_frame/test/reliability/run_all_unittests.cc @@ -33,7 +33,8 @@ int main(int argc, char **argv) { // Run() must be called within the scope of the ScopedChromeFrameRegistrar // to ensure that the correct DLL remains registered during the tests. - ScopedChromeFrameRegistrar scoped_chrome_frame_registrar(dll_path); + ScopedChromeFrameRegistrar scoped_chrome_frame_registrar( + dll_path, ScopedChromeFrameRegistrar::SYSTEM_LEVEL); result = test_suite.Run(); } else { result = test_suite.Run(); diff --git a/chrome_frame/test/run_all_unittests.cc b/chrome_frame/test/run_all_unittests.cc index 6fb4176..54129a2 100644 --- a/chrome_frame/test/run_all_unittests.cc +++ b/chrome_frame/test/run_all_unittests.cc @@ -81,12 +81,12 @@ int main(int argc, char **argv) { // AtExitManager. // TODO(robertshield): Make these tests restore the original registration // once done. - ScopedChromeFrameRegistrar registrar; + ScopedChromeFrameRegistrar registrar(chrome_frame_test::GetTestBedType()); // Register IAccessible2 proxy stub DLL, needed for some tests. ScopedChromeFrameRegistrar ia2_registrar( - chrome_frame_test::GetIAccessible2ProxyStubPath().value()); - + chrome_frame_test::GetIAccessible2ProxyStubPath().value(), + ScopedChromeFrameRegistrar::SYSTEM_LEVEL); ret = test_suite.Run(); } diff --git a/chrome_frame/test/test_with_web_server.cc b/chrome_frame/test/test_with_web_server.cc index 07b099a..adb0b96 100644 --- a/chrome_frame/test/test_with_web_server.cc +++ b/chrome_frame/test/test_with_web_server.cc @@ -929,14 +929,16 @@ const wchar_t kInstallFlowTestUrl[] = TEST_F(ChromeFrameTestWithWebServer, FullTabModeIE_InstallFlowTest) { if (base::win::GetVersion() < base::win::VERSION_VISTA) { ScopedChromeFrameRegistrar::UnregisterAtPath( - ScopedChromeFrameRegistrar::GetChromeFrameBuildPath().value()); + ScopedChromeFrameRegistrar::GetChromeFrameBuildPath().value(), + chrome_frame_test::GetTestBedType()); ASSERT_TRUE(LaunchBrowser(IE, kInstallFlowTestUrl)); loop_.RunFor(kChromeFrameLongNavigationTimeoutInSeconds); ScopedChromeFrameRegistrar::RegisterAtPath( - ScopedChromeFrameRegistrar::GetChromeFrameBuildPath().value()); + ScopedChromeFrameRegistrar::GetChromeFrameBuildPath().value(), + chrome_frame_test::GetTestBedType()); server_mock_.ExpectAndHandlePostedResult(CFInvocation(CFInvocation::NONE), kPostedResultSubstring); |