| Index: base/metrics/histogram_unittest.cc
|
| diff --git a/base/metrics/histogram_unittest.cc b/base/metrics/histogram_unittest.cc
|
| index 27c0faf6e844886ecbb3e9c56d7f75c46633ee20..9e1a1c59b869309b15e32ea925d2d3c604ddf23e 100644
|
| --- a/base/metrics/histogram_unittest.cc
|
| +++ b/base/metrics/histogram_unittest.cc
|
| @@ -315,22 +315,18 @@ TEST_F(HistogramTest, CorruptSampleCounts) {
|
| histogram->Add(40);
|
|
|
| scoped_ptr<SampleVector> snapshot = histogram->SnapshotSampleVector();
|
| - EXPECT_EQ(Histogram::NO_INCONSISTENCIES,
|
| - histogram->FindCorruption(*snapshot));
|
| + EXPECT_EQ(NO_INCONSISTENCIES, histogram->FindCorruption(*snapshot));
|
| EXPECT_EQ(2, snapshot->redundant_count());
|
| EXPECT_EQ(2, snapshot->TotalCount());
|
|
|
| snapshot->counts_[3] += 100; // Sample count won't match redundant count.
|
| - EXPECT_EQ(Histogram::COUNT_LOW_ERROR,
|
| - histogram->FindCorruption(*snapshot));
|
| + EXPECT_EQ(COUNT_LOW_ERROR, histogram->FindCorruption(*snapshot));
|
| snapshot->counts_[2] -= 200;
|
| - EXPECT_EQ(Histogram::COUNT_HIGH_ERROR,
|
| - histogram->FindCorruption(*snapshot));
|
| + EXPECT_EQ(COUNT_HIGH_ERROR, histogram->FindCorruption(*snapshot));
|
|
|
| // But we can't spot a corruption if it is compensated for.
|
| snapshot->counts_[1] += 100;
|
| - EXPECT_EQ(Histogram::NO_INCONSISTENCIES,
|
| - histogram->FindCorruption(*snapshot));
|
| + EXPECT_EQ(NO_INCONSISTENCIES, histogram->FindCorruption(*snapshot));
|
| }
|
|
|
| TEST_F(HistogramTest, CorruptBucketBounds) {
|
| @@ -338,15 +334,14 @@ TEST_F(HistogramTest, CorruptBucketBounds) {
|
| Histogram::FactoryGet("Histogram", 1, 64, 8, HistogramBase::kNoFlags));
|
|
|
| scoped_ptr<SampleVector> snapshot = histogram->SnapshotSampleVector();
|
| - EXPECT_EQ(Histogram::NO_INCONSISTENCIES,
|
| - histogram->FindCorruption(*snapshot));
|
| + EXPECT_EQ(NO_INCONSISTENCIES, histogram->FindCorruption(*snapshot));
|
|
|
| BucketRanges* bucket_ranges =
|
| const_cast<BucketRanges*>(histogram->bucket_ranges());
|
| HistogramBase::Sample tmp = bucket_ranges->range(1);
|
| bucket_ranges->set_range(1, bucket_ranges->range(2));
|
| bucket_ranges->set_range(2, tmp);
|
| - EXPECT_EQ(Histogram::BUCKET_ORDER_ERROR | Histogram::RANGE_CHECKSUM_ERROR,
|
| + EXPECT_EQ(BUCKET_ORDER_ERROR | RANGE_CHECKSUM_ERROR,
|
| histogram->FindCorruption(*snapshot));
|
|
|
| bucket_ranges->set_range(2, bucket_ranges->range(1));
|
| @@ -355,12 +350,10 @@ TEST_F(HistogramTest, CorruptBucketBounds) {
|
|
|
| // Show that two simple changes don't offset each other
|
| bucket_ranges->set_range(3, bucket_ranges->range(3) + 1);
|
| - EXPECT_EQ(Histogram::RANGE_CHECKSUM_ERROR,
|
| - histogram->FindCorruption(*snapshot));
|
| + EXPECT_EQ(RANGE_CHECKSUM_ERROR, histogram->FindCorruption(*snapshot));
|
|
|
| bucket_ranges->set_range(4, bucket_ranges->range(4) - 1);
|
| - EXPECT_EQ(Histogram::RANGE_CHECKSUM_ERROR,
|
| - histogram->FindCorruption(*snapshot));
|
| + EXPECT_EQ(RANGE_CHECKSUM_ERROR, histogram->FindCorruption(*snapshot));
|
|
|
| // Repair histogram so that destructor won't DCHECK().
|
| bucket_ranges->set_range(3, bucket_ranges->range(3) - 1);
|
|
|