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

Unified Diff: chrome/browser/chrome_browser_application_mac_unittest.mm

Issue 12207058: Connect SparseHistogram with the rest of stats system (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 10 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/chrome_browser_application_mac_unittest.mm
diff --git a/chrome/browser/chrome_browser_application_mac_unittest.mm b/chrome/browser/chrome_browser_application_mac_unittest.mm
index 9814167466d6d3b81b3ef3cdec68747372fa00f1..9c318069d54b8434e46b187275928d9a53d35df9 100644
--- a/chrome/browser/chrome_browser_application_mac_unittest.mm
+++ b/chrome/browser/chrome_browser_application_mac_unittest.mm
@@ -12,7 +12,7 @@
#import "chrome/browser/chrome_browser_application_mac.h"
#include "testing/gtest/include/gtest/gtest.h"
-using base::Histogram;
+using base::HistogramBase;
using base::HistogramSamples;
using base::StatisticsRecorder;
@@ -76,7 +76,7 @@ TEST(ChromeApplicationMacTest, RecordException) {
// We should have exactly the right number of exceptions.
StatisticsRecorder::GetSnapshot("OSX.NSException", &histograms);
EXPECT_EQ(1U, histograms.size());
- EXPECT_EQ(Histogram::kUmaTargetedHistogramFlag, histograms[0]->flags());
+ EXPECT_EQ(HistogramBase::kUmaTargetedHistogramFlag, histograms[0]->flags());
scoped_ptr<HistogramSamples> samples(histograms[0]->SnapshotSamples());
EXPECT_EQ(4, samples->GetCount(0));
@@ -85,7 +85,9 @@ TEST(ChromeApplicationMacTest, RecordException) {
EXPECT_EQ(2, samples->GetCount(3));
// The unknown exceptions should end up in the overflow bucket.
- EXPECT_EQ(kUnknownNSException + 1, histograms[0]->bucket_count());
+ EXPECT_TRUE(histograms[0]->HasConstructionArguments(1,
+ kUnknownNSException,
+ kUnknownNSException + 1));
EXPECT_EQ(4, samples->GetCount(kUnknownNSException));
}
« no previous file with comments | « base/metrics/statistics_recorder.cc ('k') | chrome/browser/extensions/api/metrics_private/metrics_apitest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698