summaryrefslogtreecommitdiffstats
path: root/chrome/test/chrome_process_util.cc
Commit message (Collapse)AuthorAgeFilesLines
* This adds some plumbing for propagating the status and error code of a ↵gspencer@chromium.org2010-12-141-2/+1
| | | | | | | | | | | | | | | | | | | | | renderer process that went away so that we can tell at the UI level what happened to the tab: did it crash, or was it killed by the OOM killer (or some other reason). This is in preparation for implementing a new UI for when a process is killed by the OOM on ChromeOS which handles it differently from a crash. Most of the changes are modifications of the argument list to include a status and error code for the exited process, but in addition the following was done: - Changed the name of DidProcessCrash to GetTerminationStatus. - Added TerminationStatus enum in process_util.h, so it can be used as the status returned by GetTerminationStatus. - Improved process_util_unittest to actually test for crashing and terminated processes on all platforms. - Added a new notification for renderers that were killed. - Added error code information to crash notification. - Added status and error code information to renderer IPC message for RenderViewGone. - Added a UMA histogram count for number of renderer kills. BUG=http://crosbug.com/8505 TEST=ran new unit test. Test passes on try servers. Review URL: http://codereview.chromium.org/5172009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69082 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Even more ctor/virtual deinlining.erg@google.com2010-10-191-0/+15
| | | | | | | | | | | (Only 424k off Linux debug .a files). BUG=none TEST=compiles Review URL: http://codereview.chromium.org/3859003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@63059 0039d316-1c4b-4281-b951-d872f2087c98
* GTTF: Terminate chrome processes in UI test in a more reliable way.phajdan.jr@chromium.org2010-09-271-27/+9
| | | | | | | | | | | | | | The previous code would never issue SIGKILL on POSIX. If the browser is severly hung, we actually need to kill it. Otherwise we leak a process and it hoses our build bots. BUG=none TEST=none Review URL: http://codereview.chromium.org/3501008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60623 0039d316-1c4b-4281-b951-d872f2087c98
* Switch to using TimeTicks for profiling and histogramsjar@chromium.org2010-05-101-4/+4
| | | | | | | | | | | Avoid using wall clock time, which can be changed by the user, or impacted by Daylight Savings transitions etc. BUG=14193 r=eroman Review URL: http://codereview.chromium.org/1253005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@46821 0039d316-1c4b-4281-b951-d872f2087c98
* Move common code into process_util.cc.maruel@chromium.org2010-04-291-9/+5
| | | | | | | | | | | | | Fix namespace usage. Change ProcessEntry to have a common interface accross platforms and change ProcessFilter::Includes() to make use of it. Split NamedProcessIterator in two. BUG=none TEST=none Review URL: http://codereview.chromium.org/1689012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@45953 0039d316-1c4b-4281-b951-d872f2087c98
* Move ProcessEntry and IoCounters inside namespace base.maruel@chromium.org2010-04-081-7/+4
| | | | | | | | | TEST=none BUG=none Review URL: http://codereview.chromium.org/1599007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43949 0039d316-1c4b-4281-b951-d872f2087c98
* Make running chrome process detection in ui tests more reliable.phajdan.jr@chromium.org2010-01-131-6/+5
| | | | | | | | | | | 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
* linux: use /proc/self/exe when exec'ing ourselvesevan@chromium.org2009-11-191-3/+4
| | | | | | | | | | | | | | | | | | | We don't want to ever go out to disk when looking for data after startup, since they can be changed by an update. We *should* just be using the zygote, but the zygote is sandboxed-only for now, and fixing that has a lengthy dependency graph. In the interim, /proc/self/exe is the correct executable and exec'ing it should work as long as the subprocess doesn't need any other files from the Chrome directory. BUG=22703 TEST=Start Chrome. Move away the entire Chrome directory; plugins should still work. Review URL: http://codereview.chromium.org/403018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32486 0039d316-1c4b-4281-b951-d872f2087c98
* Revert "linux: use /proc/self/exe when exec'ing ourselves"evan@chromium.org2009-11-191-4/+3
| | | | | | | | This reverts commit r32457. This works for me in Debug and Release, and Lei in Debug, but not for him or the bots in Release. Hate computers. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32472 0039d316-1c4b-4281-b951-d872f2087c98
* linux: use /proc/self/exe when exec'ing ourselvesevan@chromium.org2009-11-191-3/+4
| | | | | | | | | | | | | | | | | | | We don't want to ever go out to disk when looking for data after startup, since they can be changed by an update. We *should* just be using the zygote, but the zygote is sandboxed-only for now, and fixing that has a lengthy dependency graph. In the interim, /proc/self/exe is the correct executable and exec'ing it should work as long as the subprocess doesn't need any other files from the Chrome directory. BUG=22703 TEST=Start Chrome. Move away the entire Chrome directory; plugins should still work. Review URL: http://codereview.chromium.org/403018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@32457 0039d316-1c4b-4281-b951-d872f2087c98
* Get rid of GetMemoryInfo() in favor of using base::ProcessMetrics.sgk@chromium.org2009-11-051-0/+12
| | | | | | | | | | Use a test-specific subclass to isolate the stopgap use of 'ps' to collect memory stats on Mac. BUG=none TEST=none Review URL: http://codereview.chromium.org/342070 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31144 0039d316-1c4b-4281-b951-d872f2087c98
* Fix up the pid collection code for Mac OS X so it handles the different ↵thomasvl@chromium.org2009-08-141-1/+13
| | | | | | | | | | bundle names we use for the helpers. TEST=page cycler tests should show memory for the renderers again. BUG=19021 Review URL: http://codereview.chromium.org/165531 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@23439 0039d316-1c4b-4281-b951-d872f2087c98
* Increase timeout when terminating Chrome processes in tests.phajdan.jr@chromium.org2009-07-291-1/+1
| | | | | | | | | | | This should reduce the flakiness. TEST=none BUG=none Review URL: http://codereview.chromium.org/159554 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@21955 0039d316-1c4b-4281-b951-d872f2087c98
* Don't grant unnecessary handle privileges in OpenProcessHandle.phajdan.jr@chromium.org2009-06-191-1/+1
| | | | | | | | | This patch makes it harder for process handles with more privileges to leak to untrusted places. Review URL: http://codereview.chromium.org/125260 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18802 0039d316-1c4b-4281-b951-d872f2087c98
* Consistently use int64 for integers holding number of milliseconds.phajdan.jr@chromium.org2009-06-171-2/+1
| | | | | | | | | | This applies only to things which use TimeDelta::InMilliseconds, because it returns int64. Before this patch callers static_casted that to int, and after this patch they use the returned value as int64. Review URL: http://codereview.chromium.org/126279 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18626 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: refactor zygote supportagl@chromium.org2009-06-121-42/+36
| | | | | | | | | | | | | | | | | | | http://code.google.com/p/chromium/wiki/LinuxZygote * Move Chrome specific bits out of base * Move away from the idea of reserved file descriptors (which don't really work with zygotes) * Load resources before forking renderers (means that we don't need communication between the zygote process and the renderers) * Make sure that gdb works against the browser again * Make sure that we have different ASLR between the renderers and the browser. http://codereview.chromium.org/119335 (This is a reland. First landed in r18109, reverted in r18112.) git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18291 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 18109, 18111: Windows UI tests failed.agl@chromium.org2009-06-101-35/+41
| | | | git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18112 0039d316-1c4b-4281-b951-d872f2087c98
* Linux: refactor zygote supportagl@chromium.org2009-06-101-41/+35
| | | | | | | | | | | | | | | | | | http://code.google.com/p/chromium/wiki/LinuxZygote * Move Chrome specific bits out of base * Move away from the idea of reserved file descriptors (which don't really work with zygotes) * Load resources before forking renderers (means that we don't need communication between the zygote process and the renderers) * Make sure that gdb works against the browser again * Make sure that we have different ASLR between the renderers and the browser. http://codereview.chromium.org/119335 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18109 0039d316-1c4b-4281-b951-d872f2087c98
* Enable zygote manager by default.dkegel@google.com2009-06-081-1/+21
| | | | | | | | | | | | | | Fix broken recursion check. Make OpenFile warning less scary, indicate it's normal at start of ui tests. Make ui tests pass. Avoid generating extra code on Mac. BUG=11841 TEST=start the browser, then make chrome and all .pak files unreadable; or alternately, start an installed browser, and uninstall the browser while it's running. Then create a new tab and browse to two new sites. Review URL: http://codereview.chromium.org/119289 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17909 0039d316-1c4b-4281-b951-d872f2087c98
* Implement chrome_proces_util for linux and enable download ui test.estade@chromium.org2009-04-141-0/+43
| | | | | | | | | | To get the PID from the socket, we use lsof (fuser doesn't work with unix sockets apparently). The download shelf, save page, and browser ui tests now pass. Review URL: http://codereview.chromium.org/66071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13716 0039d316-1c4b-4281-b951-d872f2087c98
* Replace chrome_process_filter with chrome_process_util.estade@chromium.org2009-04-091-0/+50
- move code only used by tests to chrome/test - make a better, more portable abstraction For now, it still only works on Windows. But this is the first step to porting this part of code. Patch by phajdan.jr@chromium.org: <http://codereview.chromium.org/54003> Review URL: http://codereview.chromium.org/67004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13476 0039d316-1c4b-4281-b951-d872f2087c98