diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-24 22:06:22 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-24 22:06:22 +0000 |
commit | 50613309535025abb3bb030d5f13fac2fff235c6 (patch) | |
tree | 987484cd98074d92b5a4a7876bd1928bd643c7f7 /chrome/test/in_process_browser_test.cc | |
parent | d5c4f386029ab19cec0f4d76bede0c4d2975d431 (diff) | |
download | chromium_src-50613309535025abb3bb030d5f13fac2fff235c6.zip chromium_src-50613309535025abb3bb030d5f13fac2fff235c6.tar.gz chromium_src-50613309535025abb3bb030d5f13fac2fff235c6.tar.bz2 |
Converted the browser focus interactive ui tests to be in process.
Some testing I did as part of my in-progress focus refactoring seemed to indicate they are flacky.
With this CL, they now mostly use the blocking calls when simulating UI actions (instead of relying on timers).
BUG=None
TEST=Run the tests BrowserFocusTest.* in the interactive tests.
Review URL: http://codereview.chromium.org/27083
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10295 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/in_process_browser_test.cc')
-rw-r--r-- | chrome/test/in_process_browser_test.cc | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc index dd1f919..aae695b 100644 --- a/chrome/test/in_process_browser_test.cc +++ b/chrome/test/in_process_browser_test.cc @@ -12,6 +12,7 @@ #include "chrome/browser/browser_shutdown.h" #include "chrome/browser/profile.h" #include "chrome/browser/profile_manager.h" +#include "chrome/browser/renderer_host/render_process_host.h" #include "chrome/browser/views/frame/browser_view.h" #include "chrome/common/chrome_constants.h" #include "chrome/common/chrome_paths.h" @@ -43,7 +44,10 @@ bool DieFileDie(const std::wstring& file, bool recurse) { } // namespace -InProcessBrowserTest::InProcessBrowserTest() : browser_(NULL) { +InProcessBrowserTest::InProcessBrowserTest() + : browser_(NULL), + show_window_(false), + dom_automation_enabled_(false) { } void InProcessBrowserTest::SetUp() { @@ -68,15 +72,23 @@ void InProcessBrowserTest::SetUp() { CommandLine* command_line = CommandLine::ForCurrentProcessMutable(); // Hide windows on show. - if (!command_line->HasSwitch(kUnitTestShowWindows)) + if (!command_line->HasSwitch(kUnitTestShowWindows) && !show_window_) BrowserView::SetShowState(SW_HIDE); + if (dom_automation_enabled_) + command_line->AppendSwitch(switches::kDomAutomationController); + command_line->AppendSwitchWithValue(switches::kUserDataDir, user_data_dir); // For some reason the sandbox wasn't happy running in test mode. These // tests aren't intended to test the sandbox, so we turn it off. command_line->AppendSwitch(switches::kNoSandbox); + // Single-process mode is not set in BrowserMain so it needs to be processed + // explicitlty. + if (command_line->HasSwitch(switches::kSingleProcess)) + RenderProcessHost::set_run_renderer_in_process(true); + // Explicitly set the path of the exe used for the renderer, otherwise it'll // try to use unit_test.exe. std::wstring renderer_path; |