summaryrefslogtreecommitdiffstats
path: root/chrome/test/chrome_process_util_uitest.cc
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-13 14:37:38 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-13 14:37:38 +0000
commit4b59cf24ca1128e5b3f3b4fa8b585575d44222f7 (patch)
tree063ccb2187e2285260b309e284b2f2170b0240e4 /chrome/test/chrome_process_util_uitest.cc
parentfd7bdcc89b6483ebbfc4eaca6a7b0ba1fe1aca1b (diff)
downloadchromium_src-4b59cf24ca1128e5b3f3b4fa8b585575d44222f7.zip
chromium_src-4b59cf24ca1128e5b3f3b4fa8b585575d44222f7.tar.gz
chromium_src-4b59cf24ca1128e5b3f3b4fa8b585575d44222f7.tar.bz2
Make running chrome process detection in ui tests more reliable.
Also drops fragile code. TEST=Covered by ui_tests. BUG=10840 Review URL: http://codereview.chromium.org/545006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36119 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/test/chrome_process_util_uitest.cc')
-rw-r--r--chrome/test/chrome_process_util_uitest.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/test/chrome_process_util_uitest.cc b/chrome/test/chrome_process_util_uitest.cc
index 78f3fa9..92865c0 100644
--- a/chrome/test/chrome_process_util_uitest.cc
+++ b/chrome/test/chrome_process_util_uitest.cc
@@ -11,10 +11,11 @@ class ChromeProcessUtilTest : public UITest {
TEST_F(ChromeProcessUtilTest, SanityTest) {
EXPECT_TRUE(IsBrowserRunning());
- EXPECT_NE(-1, ChromeBrowserProcessId(user_data_dir()));
- EXPECT_GE(GetRunningChromeProcesses(user_data_dir()).size(), 1U);
+ ChromeProcessList processes = GetRunningChromeProcesses(browser_process_id());
+ EXPECT_FALSE(processes.empty());
QuitBrowser();
EXPECT_FALSE(IsBrowserRunning());
- EXPECT_EQ(-1, ChromeBrowserProcessId(user_data_dir()));
- EXPECT_EQ(0U, GetRunningChromeProcesses(user_data_dir()).size());
+ EXPECT_EQ(-1, browser_process_id());
+ processes = GetRunningChromeProcesses(browser_process_id());
+ EXPECT_TRUE(processes.empty());
}