Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6271)

Unified Diff: chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc

Issue 1320153002: Add new termination status for failed launch (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase and a nit. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/metrics/chrome_stability_metrics_provider.cc ('k') | chrome/browser/ui/sad_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc
diff --git a/chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc b/chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc
index efb86281ddc7ed71d89af95270a6b464f9666616..96748ba9d05bc1b5c77d7cb9c0ec466351ee23c6 100644
--- a/chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc
+++ b/chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc
@@ -112,13 +112,22 @@ TEST_F(ChromeStabilityMetricsProviderTest, NotificationObserver) {
content::Details<content::RenderProcessHost::RendererClosedDetails>(
&kill_details));
+ // Failed launch increments crash count.
+ content::RenderProcessHost::RendererClosedDetails failed_launch_details(
+ base::TERMINATION_STATUS_LAUNCH_FAILED, 1);
+ provider.Observe(
+ content::NOTIFICATION_RENDERER_PROCESS_CLOSED,
+ content::Source<content::RenderProcessHost>(host),
+ content::Details<content::RenderProcessHost::RendererClosedDetails>(
+ &failed_launch_details));
+
metrics::SystemProfileProto system_profile;
// Call ProvideStabilityMetrics to check that it will force pending tasks to
// be executed immediately.
provider.ProvideStabilityMetrics(&system_profile);
- EXPECT_EQ(2, system_profile.stability().renderer_crash_count());
+ EXPECT_EQ(3, system_profile.stability().renderer_crash_count());
EXPECT_EQ(0, system_profile.stability().extension_renderer_crash_count());
#if defined(ENABLE_EXTENSIONS)
« no previous file with comments | « chrome/browser/metrics/chrome_stability_metrics_provider.cc ('k') | chrome/browser/ui/sad_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698