summaryrefslogtreecommitdiffstats
path: root/chrome_frame/test/chrome_frame_test_utils.cc
diff options
context:
space:
mode:
authorgrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-28 15:28:57 +0000
committergrt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-02-28 15:28:57 +0000
commitb8f8723b5e2a7da9fdd5e22f4f13c4f0f267624c (patch)
treefca8a1b9378df7da34a2c370af6b5d180f5bf387 /chrome_frame/test/chrome_frame_test_utils.cc
parent270961e1c438b1045f9ea6dd131d90f57d41ce44 (diff)
downloadchromium_src-b8f8723b5e2a7da9fdd5e22f4f13c4f0f267624c.zip
chromium_src-b8f8723b5e2a7da9fdd5e22f4f13c4f0f267624c.tar.gz
chromium_src-b8f8723b5e2a7da9fdd5e22f4f13c4f0f267624c.tar.bz2
Reduce flakiness in chrome_frame_tests.exe by having each test run in a clean environment.
This includes: * A TestScrubber runs between all test to kill stray IE and Chrome processes and delete the user data dir. * Refactored CFACWithChrome and ProxyFactoryTest tests to get rid of copy-n-paste. * Tests in ChromeFrameTestWithWebServer that launch Chrome now use a fresh user data dir so as not to collide with a users' existing profile. BUG=81479,114386 TEST=chrome_frame_tests.exe is green on the win_cf trybot Review URL: https://chromiumcodereview.appspot.com/9460019 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@123973 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test/chrome_frame_test_utils.cc')
-rw-r--r--chrome_frame/test/chrome_frame_test_utils.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/chrome_frame/test/chrome_frame_test_utils.cc b/chrome_frame/test/chrome_frame_test_utils.cc
index 7175eb8..59b542a 100644
--- a/chrome_frame/test/chrome_frame_test_utils.cc
+++ b/chrome_frame/test/chrome_frame_test_utils.cc
@@ -177,13 +177,16 @@ base::ProcessHandle LaunchExecutable(const std::wstring& executable,
return process;
}
-base::ProcessHandle LaunchChrome(const std::wstring& url) {
+base::ProcessHandle LaunchChrome(const std::wstring& url,
+ const FilePath& user_data_dir) {
FilePath path;
PathService::Get(base::DIR_MODULE, &path);
path = path.AppendASCII(kChromeImageName);
CommandLine cmd(path);
cmd.AppendSwitch(switches::kNoFirstRun);
+ if (!user_data_dir.empty())
+ cmd.AppendSwitchPath(switches::kUserDataDir, user_data_dir);
cmd.AppendArgNative(url);
base::ProcessHandle process = NULL;