diff options
author | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-11 19:04:08 +0000 |
---|---|---|
committer | mpcomplete@google.com <mpcomplete@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-11 19:04:08 +0000 |
commit | 605246deea1633608c1e445e5c1b8dbc0926be65 (patch) | |
tree | a83413de009c5b092d97513c98469cd14f466395 /chrome/test | |
parent | b6b8365e8ada7beb4a9b7cbe8c7cebd60cbb4959 (diff) | |
download | chromium_src-605246deea1633608c1e445e5c1b8dbc0926be65.zip chromium_src-605246deea1633608c1e445e5c1b8dbc0926be65.tar.gz chromium_src-605246deea1633608c1e445e5c1b8dbc0926be65.tar.bz2 |
Try to make ExtensionViewTest less flaky by running it in single-process mode.
Review URL: http://codereview.chromium.org/42055
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11467 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test')
-rw-r--r-- | chrome/test/in_process_browser_test.cc | 6 | ||||
-rw-r--r-- | chrome/test/in_process_browser_test.h | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/chrome/test/in_process_browser_test.cc b/chrome/test/in_process_browser_test.cc index aec6391..2fe5a3bd 100644 --- a/chrome/test/in_process_browser_test.cc +++ b/chrome/test/in_process_browser_test.cc @@ -47,7 +47,8 @@ bool DieFileDie(const std::wstring& file, bool recurse) { InProcessBrowserTest::InProcessBrowserTest() : browser_(NULL), show_window_(false), - dom_automation_enabled_(false) { + dom_automation_enabled_(false), + single_process_(false) { } void InProcessBrowserTest::SetUp() { @@ -78,6 +79,9 @@ void InProcessBrowserTest::SetUp() { if (dom_automation_enabled_) command_line->AppendSwitch(switches::kDomAutomationController); + if (single_process_) + command_line->AppendSwitch(switches::kSingleProcess); + command_line->AppendSwitchWithValue(switches::kUserDataDir, user_data_dir); // For some reason the sandbox wasn't happy running in test mode. These diff --git a/chrome/test/in_process_browser_test.h b/chrome/test/in_process_browser_test.h index 90dcdc9..481103e 100644 --- a/chrome/test/in_process_browser_test.h +++ b/chrome/test/in_process_browser_test.h @@ -77,6 +77,7 @@ class InProcessBrowserTest : public testing::Test, public NotificationObserver { // constructor. void set_show_window(bool show) { show_window_ = show; } void EnableDOMAutomation() { dom_automation_enabled_ = true; } + void EnableSingleProcess() { single_process_ = true; } private: // Invokes CreateBrowser to create a browser, then RunTestOnMainThread, and @@ -100,6 +101,9 @@ class InProcessBrowserTest : public testing::Test, public NotificationObserver { // that can send messages back to the browser). bool dom_automation_enabled_; + // Whether to run the test in single-process mode. + bool single_process_; + DISALLOW_COPY_AND_ASSIGN(InProcessBrowserTest); }; |