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:38:21 +0000
committerwillchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-17 19:38:21 +0000
commitd0e629845f2ce6886377c093b62cd42f7e7da23d (patch)
tree7f7423722a03ecd8296d60bd8ed218ed2d4397e3 /chrome/browser/metrics
parentdfcb62a173898e182e2f10ca635deb753977b9f8 (diff)
downloadchromium_src-d0e629845f2ce6886377c093b62cd42f7e7da23d.zip
chromium_src-d0e629845f2ce6886377c093b62cd42f7e7da23d.tar.gz
chromium_src-d0e629845f2ce6886377c093b62cd42f7e7da23d.tar.bz2
Revert r18641: "Linux: Enable metrics_service_uitest.cc."
Broke ui_tests. Review URL: http://codereview.chromium.org/125268 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@18646 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/metrics')
-rw-r--r--chrome/browser/metrics/metrics_service_uitest.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/chrome/browser/metrics/metrics_service_uitest.cc b/chrome/browser/metrics/metrics_service_uitest.cc
index 9f5f7e7..7245a35 100644
--- a/chrome/browser/metrics/metrics_service_uitest.cc
+++ b/chrome/browser/metrics/metrics_service_uitest.cc
@@ -90,8 +90,14 @@ TEST_F(MetricsServiceTest, CrashRenderers) {
// kill the process for one of the tabs
scoped_refptr<TabProxy> tab(window_->GetTab(1));
ASSERT_TRUE(tab.get());
-
- tab->NavigateToURLAsync(GURL("about:crash"));
+ 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);
// Give the browser a chance to notice the crashed tab.
PlatformThread::Sleep(1000);
@@ -105,6 +111,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(4, local_state->GetInteger(prefs::kStabilityPageLoadCount));
+ EXPECT_EQ(3, local_state->GetInteger(prefs::kStabilityPageLoadCount));
EXPECT_EQ(1, local_state->GetInteger(prefs::kStabilityRendererCrashCount));
}