Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(9104)

Unified Diff: chrome/test/in_process_browser_test.cc

Issue 27122: Another attempt at landing the new browser focus interactive ui tests (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/test/in_process_browser_test.h ('k') | chrome/test/interactive_ui/interactive_ui.vcproj » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/test/in_process_browser_test.cc
===================================================================
--- chrome/test/in_process_browser_test.cc (revision 10330)
+++ chrome/test/in_process_browser_test.cc (working copy)
@@ -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 @@
} // namespace
-InProcessBrowserTest::InProcessBrowserTest() : browser_(NULL) {
+InProcessBrowserTest::InProcessBrowserTest()
+ : browser_(NULL),
+ show_window_(false),
+ dom_automation_enabled_(false) {
}
void InProcessBrowserTest::SetUp() {
@@ -68,15 +72,23 @@
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;
« no previous file with comments | « chrome/test/in_process_browser_test.h ('k') | chrome/test/interactive_ui/interactive_ui.vcproj » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698