summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-06 23:50:42 +0000
committerjcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-06 23:50:42 +0000
commit8244fafba0c441b0a76cd4679f23ade2c7c8e208 (patch)
treeed9983035452799f25d93d40ab91d9668dd0cbee
parent706197adc80edd1b1b73a6eea38a5b080609b103 (diff)
downloadchromium_src-8244fafba0c441b0a76cd4679f23ade2c7c8e208.zip
chromium_src-8244fafba0c441b0a76cd4679f23ade2c7c8e208.tar.gz
chromium_src-8244fafba0c441b0a76cd4679f23ade2c7c8e208.tar.bz2
Relanding the CL that made interactive UI tests run out-of-proc.
It was causing them to hang on Windows. I cannot repro on my box. I added a timeout to the ViewEventTest as I suspect they are the ones causing the timeout. Original review: http://codereview.chromium.org/355014/show TEST=None TBR=rafael Review URL: http://codereview.chromium.org/360016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31327 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome/browser/browser_focus_uitest.cc2
-rw-r--r--chrome/test/interactive_ui/interactive_ui_tests.gypi11
-rw-r--r--chrome/test/test_launcher/out_of_proc_test_runner.cc5
3 files changed, 11 insertions, 7 deletions
diff --git a/chrome/browser/browser_focus_uitest.cc b/chrome/browser/browser_focus_uitest.cc
index f0b0a54..7a07b1e 100644
--- a/chrome/browser/browser_focus_uitest.cc
+++ b/chrome/browser/browser_focus_uitest.cc
@@ -332,7 +332,6 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, DISABLED_TabsRememberFocusFindInPage) {
}
// Background window does not steal focus.
-#if !defined(OS_LINUX)
IN_PROC_BROWSER_TEST_F(BrowserFocusTest, BackgroundBrowserDontStealFocus) {
HTTPTestServer* server = StartHTTPServer();
@@ -380,7 +379,6 @@ IN_PROC_BROWSER_TEST_F(BrowserFocusTest, BackgroundBrowserDontStealFocus) {
// Close the 2nd browser to avoid a DCHECK().
browser2->window()->Close();
}
-#endif
// Page cannot steal focus when focus is on location bar.
IN_PROC_BROWSER_TEST_F(BrowserFocusTest, LocationBarLockFocus) {
diff --git a/chrome/test/interactive_ui/interactive_ui_tests.gypi b/chrome/test/interactive_ui/interactive_ui_tests.gypi
index c43d244..7f0838c 100644
--- a/chrome/test/interactive_ui/interactive_ui_tests.gypi
+++ b/chrome/test/interactive_ui/interactive_ui_tests.gypi
@@ -25,7 +25,6 @@
'include_dirs': [
'<(DEPTH)',
],
- # TODO(phajdan.jr): Only temporary, to make transition easier.
'defines': [ 'ALLOW_IN_PROC_BROWSER_TEST' ],
'sources': [
'<(DEPTH)/chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc',
@@ -41,6 +40,12 @@
'<(DEPTH)/chrome/test/interactive_ui/npapi_interactive_test.cc',
'<(DEPTH)/chrome/test/interactive_ui/view_event_test_base.cc',
'<(DEPTH)/chrome/test/interactive_ui/view_event_test_base.h',
+ # TODO(jcampan): we should use in_proc_test_runner on Windows.
+ '<(DEPTH)/chrome/test/test_launcher/out_of_proc_test_runner.cc',
+ '<(DEPTH)/chrome/test/test_launcher/test_runner.cc',
+ '<(DEPTH)/chrome/test/test_launcher/test_runner.h',
+ '<(DEPTH)/chrome/test/test_launcher/run_all_unittests.cc',
+ '<(DEPTH)/chrome/test/unit/chrome_test_suite.h',
],
'conditions': [
['OS=="linux"', {
@@ -49,10 +54,6 @@
'<(DEPTH)/tools/xdisplaycheck/xdisplaycheck.gyp:xdisplaycheck',
],
'sources!': [
- # TODO(jcampan) - Re-enable failing browsertests on linux: (crbug.com/26540).
- '<(DEPTH)/chrome/browser/autocomplete/autocomplete_edit_view_browsertest.cc',
- '<(DEPTH)/chrome/browser/browser_focus_uitest.cc',
- '<(DEPTH)/chrome/browser/debugger/devtools_sanity_unittest.cc',
# TODO(port)
'<(DEPTH)/chrome/browser/views/bookmark_bar_view_test.cc',
'<(DEPTH)/chrome/browser/views/find_bar_host_interactive_uitest.cc',
diff --git a/chrome/test/test_launcher/out_of_proc_test_runner.cc b/chrome/test/test_launcher/out_of_proc_test_runner.cc
index dd1f5af..e6f861b 100644
--- a/chrome/test/test_launcher/out_of_proc_test_runner.cc
+++ b/chrome/test/test_launcher/out_of_proc_test_runner.cc
@@ -33,7 +33,12 @@ class OutOfProcTestRunner : public tests::TestRunner {
// Returns true if the test succeeded, false if it failed.
bool RunTest(const std::string& test_name) {
const CommandLine* cmd_line = CommandLine::ForCurrentProcess();
+#if defined(OS_WIN)
+ CommandLine new_cmd_line =
+ CommandLine::FromString(cmd_line->command_line_string());
+#else
CommandLine new_cmd_line(cmd_line->argv());
+#endif
// Always enable disabled tests. This method is not called with disabled
// tests unless this flag was specified to the browser test executable.
new_cmd_line.AppendSwitch("gtest_also_run_disabled_tests");