diff options
author | jrt@chromium.org <jrt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-27 16:47:45 +0000 |
---|---|---|
committer | jrt@chromium.org <jrt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-27 16:47:45 +0000 |
commit | 1429a095ca7e3c05baafd622e61417aed5247ab6 (patch) | |
tree | 982827ae58ef47d0ddc244800eeb6becdb3c1b01 | |
parent | 41110ca3f3f992498d189e6936dc5c4c2d12b916 (diff) | |
download | chromium_src-1429a095ca7e3c05baafd622e61417aed5247ab6.zip chromium_src-1429a095ca7e3c05baafd622e61417aed5247ab6.tar.gz chromium_src-1429a095ca7e3c05baafd622e61417aed5247ab6.tar.bz2 |
Chromium-branding bug fix and test re-enable.
After revision 90141, the WorkerTest.TerminateQueuedWorkers failed on mac
ui_tests. The test was disabled in revision 90152. Now the bug is resolved,
the test is re-enabled and passes on mac ui_tests.
BUG=87204
Review URL: http://codereview.chromium.org/7240014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@90593 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/test/chrome_process_util.cc | 13 | ||||
-rw-r--r-- | chrome/test/chrome_process_util.h | 5 | ||||
-rw-r--r-- | content/worker/test/worker_uitest.cc | 5 |
3 files changed, 14 insertions, 9 deletions
diff --git a/chrome/test/chrome_process_util.cc b/chrome/test/chrome_process_util.cc index 363ea95..ad54a8e 100644 --- a/chrome/test/chrome_process_util.cc +++ b/chrome/test/chrome_process_util.cc @@ -52,15 +52,22 @@ class ChildProcessFilter : public base::ProcessFilter { DISALLOW_COPY_AND_ASSIGN(ChildProcessFilter); }; -const FilePath::CharType* GetRunningExecutableName() { +const FilePath::CharType* GetRunningBrowserExecutableName() { const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); if (cmd_line->HasSwitch(switches::kEnableChromiumBranding)) return chrome::kBrowserProcessExecutableNameChromium; return chrome::kBrowserProcessExecutableName; } +const FilePath::CharType* GetRunningHelperExecutableName() { + const CommandLine* cmd_line = CommandLine::ForCurrentProcess(); + if (cmd_line->HasSwitch(switches::kEnableChromiumBranding)) + return chrome::kHelperProcessExecutableNameChromium; + return chrome::kHelperProcessExecutableName; +} + ChromeProcessList GetRunningChromeProcesses(base::ProcessId browser_pid) { - const FilePath::CharType* executable_name = GetRunningExecutableName(); + const FilePath::CharType* executable_name = GetRunningBrowserExecutableName(); ChromeProcessList result; if (browser_pid == static_cast<base::ProcessId>(-1)) return result; @@ -89,7 +96,7 @@ ChromeProcessList GetRunningChromeProcesses(base::ProcessId browser_pid) { // name. We must collect them in a second pass. { ChildProcessFilter filter(browser_pid); - base::NamedProcessIterator it(executable_name, &filter); + base::NamedProcessIterator it(GetRunningHelperExecutableName(), &filter); while (const base::ProcessEntry* process_entry = it.NextProcessEntry()) result.push_back(process_entry->pid()); } diff --git a/chrome/test/chrome_process_util.h b/chrome/test/chrome_process_util.h index 88bd271..aabcb91 100644 --- a/chrome/test/chrome_process_util.h +++ b/chrome/test/chrome_process_util.h @@ -14,7 +14,10 @@ typedef std::vector<base::ProcessId> ChromeProcessList; // Returns the executable name of the current Chrome browser process. -const FilePath::CharType* GetRunningExecutableName(); +const FilePath::CharType* GetRunningBrowserExecutableName(); + +// Returns the executable name of the current Chrome helper process. +const FilePath::CharType* GetRunningHelperExecutableName(); // Returns a vector of PIDs of all chrome processes (main and renderers etc) // based on |browser_pid|, the PID of the main browser process. diff --git a/content/worker/test/worker_uitest.cc b/content/worker/test/worker_uitest.cc index 5748ea6..d6b884e 100644 --- a/content/worker/test/worker_uitest.cc +++ b/content/worker/test/worker_uitest.cc @@ -190,11 +190,6 @@ TEST_F(WorkerTest, MultipleSharedWorkers) { #define TerminateQueuedWorkers FLAKY_TerminateQueuedWorkers #endif -#if defined(OS_MACOSX) -// http://crbug.com/87204 -#define TerminateQueuedWorkers DISABLED_TerminateQueuedWorkers -#endif - TEST_F(WorkerTest, TerminateQueuedWorkers) { ASSERT_TRUE(WaitForProcessCountToBe(1, 0)); RunTest(FilePath(FILE_PATH_LITERAL("terminate_queued_workers.html")), ""); |