diff options
author | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-05 20:37:12 +0000 |
---|---|---|
committer | jianli@chromium.org <jianli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-05 20:37:12 +0000 |
commit | c99613d0bc1dd6d06839ac72e08a8f2dc6e7fa6b (patch) | |
tree | 104d77187731893f12cc0f501ec2c5c4cc396d3a /chrome/test/ui | |
parent | 1568d5ece313093ddfe8558dd14469780de37e61 (diff) | |
download | chromium_src-c99613d0bc1dd6d06839ac72e08a8f2dc6e7fa6b.zip chromium_src-c99613d0bc1dd6d06839ac72e08a8f2dc6e7fa6b.tar.gz chromium_src-c99613d0bc1dd6d06839ac72e08a8f2dc6e7fa6b.tar.bz2 |
Fix bug 23303: ui_tests crash Windows 7's shell when running WorkerHttpLayoutTests.
The crash is caused by lighttpd server starting on the foreground mode and it messed up with the command window host.
To work around this, we start the http server on the background mode if running UI test under Windows 7.
BUG=23303
TEST=none
Review URL: http://codereview.chromium.org/257047
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28030 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/ui')
-rw-r--r-- | chrome/test/ui/ui_test.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/test/ui/ui_test.cc b/chrome/test/ui/ui_test.cc index 65a453d..eac4367 100644 --- a/chrome/test/ui/ui_test.cc +++ b/chrome/test/ui/ui_test.cc @@ -34,6 +34,10 @@ #include "googleurl/src/gurl.h" #include "net/base/net_util.h" +#if defined(OS_WIN) +#include "base/win_util.h" +#endif + using base::TimeTicks; @@ -307,6 +311,15 @@ void UITest::StartHttpServer(const FilePath& root_directory) { cmd_line->AppendSwitchWithValue(L"server", L"start"); cmd_line->AppendSwitch(L"register_cygwin"); cmd_line->AppendSwitchWithValue(L"root", root_directory.ToWStringHack()); + + // For Windows 7, if we start the lighttpd server on the foreground mode, + // it will mess up with the command window and cause conhost.exe to crash. To + // work around this, we start the http server on the background mode. +#if defined(OS_WIN) + if (win_util::GetWinVersion() >= win_util::WINVERSION_WIN7) + cmd_line->AppendSwitch(L"run_background"); +#endif + RunCommand(*cmd_line.get()); } |