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

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: code review comments. add test. Created 5 years, 4 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
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 81a12e777e7c2a61aae23b298e139b238f51ebe2..ff5eae0ace7de3e1d798e679ccb505976483c5c2 100644
--- a/chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc
+++ b/chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc
@@ -91,6 +91,15 @@ 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
@@ -100,5 +109,5 @@ TEST_F(ChromeStabilityMetricsProviderTest, NotificationObserver) {
const metrics::SystemProfileProto_Stability& stability =
system_profile.stability();
- EXPECT_EQ(2, stability.renderer_crash_count());
+ EXPECT_EQ(3, stability.renderer_crash_count());
}

Powered by Google App Engine
This is Rietveld 408576698