summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/browser_command_controller_unittest.cc
diff options
context:
space:
mode:
authorgab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-25 20:37:34 +0000
committergab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-25 20:37:34 +0000
commited2fa729af0311cc4d5f30be5f0368fad248d64a (patch)
treec45e4e3f8c451d3f3f91a81462e7ca89f4b63ef8 /chrome/browser/ui/browser_command_controller_unittest.cc
parentaad4d73e53b96e47aff9a90eb565f3a2e0995649 (diff)
downloadchromium_src-ed2fa729af0311cc4d5f30be5f0368fad248d64a.zip
chromium_src-ed2fa729af0311cc4d5f30be5f0368fad248d64a.tar.gz
chromium_src-ed2fa729af0311cc4d5f30be5f0368fad248d64a.tar.bz2
Make all tests use GetActiveDesktop() instead of hardcoding HOST_DESKTOP_TYPE_NATIVE.
Core components (in chrome/test/base/in_process_browser_test.cc): 1) Adds a check to ensure that browsers are only created on the tested desktop -- **postponed to a follow-up CL**. 2) Adds the --silent-launch flag to Ash browser_tests to prevent Ash browser_tests from using the regular startup path which is hardcoded to open a browser on the native desktop (--silent-launch is also used by the real Chrome viewer when it launches in Ash). Also clarified comments in chrome/browser/ui/host_desktop.h to highlight the fact that hardcoded enums and GetActiveDesktop() are not usually what you should use (especially since GetActiveDesktop() is used more often in tests now, I don't want people to believe it's the right way to get the current desktop in non-test code). BUG=179830 TEST="browser_tests --ash-browsertests" mostly works (i.e. tested manually and test passes with no window ever popping on the native desktop)! Review URL: https://chromiumcodereview.appspot.com/17379022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@208541 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/browser_command_controller_unittest.cc')
-rw-r--r--chrome/browser/ui/browser_command_controller_unittest.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/chrome/browser/ui/browser_command_controller_unittest.cc b/chrome/browser/ui/browser_command_controller_unittest.cc
index 87e9be5..6d50522 100644
--- a/chrome/browser/ui/browser_command_controller_unittest.cc
+++ b/chrome/browser/ui/browser_command_controller_unittest.cc
@@ -301,8 +301,7 @@ TEST_F(BrowserCommandControllerTest,
profile1->SetOffTheRecordProfile(profile2);
// Create a new browser based on the off the record profile.
- Browser::CreateParams profile_params(profile2,
- chrome::HOST_DESKTOP_TYPE_NATIVE);
+ Browser::CreateParams profile_params(profile2, chrome::GetActiveDesktop());
scoped_ptr<Browser> browser2(
chrome::CreateBrowserWithTestWindowForParams(&profile_params));