summaryrefslogtreecommitdiffstats
path: root/chrome/browser/metrics
diff options
context:
space:
mode:
authorwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-17 19:06:26 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-17 19:06:26 +0000
commit89ef3a0ca7e75eabc15509dbd8734625420e673b (patch)
tree8b4807e074c028924fa5d1264042fd341963ce38 /chrome/browser/metrics
parent519357d2b8ab7ac8d8a6c3fed1dbe744dc6f1bd5 (diff)
downloadchromium_src-89ef3a0ca7e75eabc15509dbd8734625420e673b.zip
chromium_src-89ef3a0ca7e75eabc15509dbd8734625420e673b.tar.gz
chromium_src-89ef3a0ca7e75eabc15509dbd8734625420e673b.tar.bz2
Linux: Enable metrics_service_uitest.cc.
Add support for zygotes to call DidProcessCrash on renderers. TEST=metrics_server_uitest.cc Review URL: http://codereview.chromium.org/126264 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18641 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/metrics')
-rw-r--r--chrome/browser/metrics/metrics_service_uitest.cc12
1 files changed, 3 insertions, 9 deletions
diff --git a/chrome/browser/metrics/metrics_service_uitest.cc b/chrome/browser/metrics/metrics_service_uitest.cc
index 7245a35..9f5f7e7 100644
--- a/chrome/browser/metrics/metrics_service_uitest.cc
+++ b/chrome/browser/metrics/metrics_service_uitest.cc
@@ -90,14 +90,8 @@ TEST_F(MetricsServiceTest, CrashRenderers) {
// kill the process for one of the tabs
scoped_refptr<TabProxy> tab(window_->GetTab(1));
ASSERT_TRUE(tab.get());
- int process_id = 0;
- ASSERT_TRUE(tab->GetProcessID(&process_id));
- ASSERT_NE(0, process_id);
- base::ProcessHandle process_handle;
- ASSERT_TRUE(base::OpenProcessHandle(process_id, &process_handle));
- // Fake Access Violation.
- base::KillProcess(process_handle, 0xc0000005, true);
- base::CloseProcessHandle(process_handle);
+
+ tab->NavigateToURLAsync(GURL("about:crash"));
// Give the browser a chance to notice the crashed tab.
PlatformThread::Sleep(1000);
@@ -111,6 +105,6 @@ TEST_F(MetricsServiceTest, CrashRenderers) {
local_state->RegisterIntegerPref(prefs::kStabilityRendererCrashCount, 0);
EXPECT_TRUE(local_state->GetBoolean(prefs::kStabilityExitedCleanly));
EXPECT_EQ(1, local_state->GetInteger(prefs::kStabilityLaunchCount));
- EXPECT_EQ(3, local_state->GetInteger(prefs::kStabilityPageLoadCount));
+ EXPECT_EQ(4, local_state->GetInteger(prefs::kStabilityPageLoadCount));
EXPECT_EQ(1, local_state->GetInteger(prefs::kStabilityRendererCrashCount));
}