summaryrefslogtreecommitdiffstats
path: root/chrome/browser/performance_monitor
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/performance_monitor
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/performance_monitor')
-rw-r--r--chrome/browser/performance_monitor/performance_monitor_browsertest.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/browser/performance_monitor/performance_monitor_browsertest.cc b/chrome/browser/performance_monitor/performance_monitor_browsertest.cc
index 535bb34..3d2c95c 100644
--- a/chrome/browser/performance_monitor/performance_monitor_browsertest.cc
+++ b/chrome/browser/performance_monitor/performance_monitor_browsertest.cc
@@ -374,7 +374,7 @@ class PerformanceMonitorSessionRestoreBrowserTest
content::TestNavigationObserver restore_observer(NULL, expected_tab_count);
restore_observer.StartWatchingNewWebContents();
ui_test_utils::BrowserAddedObserver window_observer;
- chrome::NewEmptyWindow(profile, chrome::HOST_DESKTOP_TYPE_NATIVE);
+ chrome::NewEmptyWindow(profile, chrome::GetActiveDesktop());
Browser* new_browser = window_observer.WaitForSingleNewBrowser();
restore_observer.Wait();
g_browser_process->ReleaseModule();