From daf05bb1f88fa0c16b5991a814fa077147bb43f1 Mon Sep 17 00:00:00 2001 From: "ericroman@google.com" Date: Tue, 18 Nov 2008 06:01:51 +0000 Subject: Add the flag "--extra-chrome-flags" for all UI tests. This is used to plumb though extra flags to pass to chrome.exe. For example, to run reliability tests with WinHTTP stack: reliability_tests.exe --extra-chrome-flags="--winhttp" Note that no attempt is made to avoid duplicate parameters. Review URL: http://codereview.chromium.org/11436 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5599 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/test/ui/ui_test.cc | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'chrome') diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index 41b1325..72d2f57 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -46,6 +46,8 @@ bool UITest::disable_breakpad_ = false; int UITest::timeout_ms_ = 20 * 60 * 1000; std::wstring UITest::js_flags_ = L""; +const wchar_t kExtraChromeFlagsSwitch[] = L"extra-chrome-flags"; + // Uncomment this line to have the spawned process wait for the debugger to // attach. // #define WAIT_FOR_DEBUGGER_ON_OPEN 1 @@ -150,6 +152,12 @@ void UITest::LaunchBrowser(const std::wstring& arguments, bool clear_profile) { file_util::AppendToPath(&command_line, chrome::kBrowserProcessExecutableName); + // Add any explict command line flags passed to the process. + std::wstring extra_chrome_flags = + CommandLine().GetSwitchValue(kExtraChromeFlagsSwitch); + if (!extra_chrome_flags.empty()) + command_line.append(L" " + extra_chrome_flags); + // We need cookies on file:// for things like the page cycler. CommandLine::AppendSwitch(&command_line, switches::kEnableFileCookies); -- cgit v1.1