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

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

Issue 1366643002: Extract guts of ChromeStabilityMetricsProvider into helper class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase 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_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/metrics/metrics_service_browsertest.cc
diff --git a/chrome/browser/metrics/metrics_service_browsertest.cc b/chrome/browser/metrics/metrics_service_browsertest.cc
index f77221c3554d14768e26fce63beb38c68933311a..b3ca37f49a6a328e9e8634ec16ed04f1b57361f7 100644
--- a/chrome/browser/metrics/metrics_service_browsertest.cc
+++ b/chrome/browser/metrics/metrics_service_browsertest.cc
@@ -65,8 +65,8 @@ IN_PROC_BROWSER_TEST_F(MetricsServiceBrowserTest, CloseRenderersNormally) {
// Verify that the expected stability metrics were recorded.
const PrefService* prefs = g_browser_process->local_state();
EXPECT_EQ(1, prefs->GetInteger(metrics::prefs::kStabilityLaunchCount));
- EXPECT_EQ(3, prefs->GetInteger(prefs::kStabilityPageLoadCount));
- EXPECT_EQ(0, prefs->GetInteger(prefs::kStabilityRendererCrashCount));
+ EXPECT_EQ(3, prefs->GetInteger(metrics::prefs::kStabilityPageLoadCount));
+ EXPECT_EQ(0, prefs->GetInteger(metrics::prefs::kStabilityRendererCrashCount));
// TODO(isherman): We should also verify that
// metrics::prefs::kStabilityExitedCleanly
// is set to true, but this preference isn't set until the browser
@@ -98,14 +98,14 @@ IN_PROC_BROWSER_TEST_F(MetricsServiceBrowserTest, MAYBE_CrashRenderers) {
// since the notification is posted to all observers essentially
// simultaneously... so busy waiting here shouldn't be too bad.
const PrefService* prefs = g_browser_process->local_state();
- while (!prefs->GetInteger(prefs::kStabilityRendererCrashCount)) {
+ while (!prefs->GetInteger(metrics::prefs::kStabilityRendererCrashCount)) {
content::RunAllPendingInMessageLoop();
}
// Verify that the expected stability metrics were recorded.
EXPECT_EQ(1, prefs->GetInteger(metrics::prefs::kStabilityLaunchCount));
- EXPECT_EQ(4, prefs->GetInteger(prefs::kStabilityPageLoadCount));
- EXPECT_EQ(1, prefs->GetInteger(prefs::kStabilityRendererCrashCount));
+ EXPECT_EQ(4, prefs->GetInteger(metrics::prefs::kStabilityPageLoadCount));
+ EXPECT_EQ(1, prefs->GetInteger(metrics::prefs::kStabilityRendererCrashCount));
// TODO(isherman): We should also verify that
// metrics::prefs::kStabilityExitedCleanly
// is set to true, but this preference isn't set until the browser
« no previous file with comments | « chrome/browser/metrics/chrome_stability_metrics_provider_unittest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698