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

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

Issue 108683003: Store gpu crashes in the systemprofileproto (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Alexei comments1 Created 7 years 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/metrics_log_unittest.cc
diff --git a/chrome/browser/metrics/metrics_log_unittest.cc b/chrome/browser/metrics/metrics_log_unittest.cc
index 5d6771fc893cfd05e57dfa48da1b894ea562e049..b5651f964b753d8142400c0ca81de343cef7a1d4 100644
--- a/chrome/browser/metrics/metrics_log_unittest.cc
+++ b/chrome/browser/metrics/metrics_log_unittest.cc
@@ -384,6 +384,18 @@ TEST_F(MetricsLogTest, OngoingLogStabilityMetrics) {
EXPECT_FALSE(stability.has_debugger_not_present_count());
}
+TEST_F(MetricsLogTest, GpuCrashMetric) {
+ TestMetricsLog log(kClientId, kSessionId);
+ log.GetPrefService()->SetInteger(prefs::kStabilityGpuCrashCount, 12);
+ log.RecordEnvironment(std::vector<content::WebPluginInfo>(),
+ GoogleUpdateMetrics(),
+ std::vector<chrome_variations::ActiveGroupId>());
+ log.RecordStabilityMetrics(base::TimeDelta(), MetricsLog::ONGOING_LOG);
+ const metrics::SystemProfileProto_Stability& stability =
+ log.system_profile().stability();
+ EXPECT_EQ(12, stability.gpu_crash_count());
+}
+
#if defined(ENABLE_PLUGINS)
TEST_F(MetricsLogTest, Plugins) {
TestMetricsLog log(kClientId, kSessionId);

Powered by Google App Engine
This is Rietveld 408576698