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

Side by Side Diff: base/metrics/statistics_recorder_unittest.cc

Issue 2828373002: Revert of Report CHECK/DCHECK to test launcher summary output. (Closed)
Patch Set: Created 3 years, 8 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 unified diff | Download patch
« no previous file with comments | « base/logging_unittest.cc ('k') | base/strings/string_piece.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/metrics/statistics_recorder.h" 5 #include "base/metrics/statistics_recorder.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <vector> 10 #include <vector>
(...skipping 11 matching lines...) Expand all
22 namespace { 22 namespace {
23 23
24 // Class to make sure any manipulations we do to the min log level are 24 // Class to make sure any manipulations we do to the min log level are
25 // contained (i.e., do not affect other unit tests). 25 // contained (i.e., do not affect other unit tests).
26 class LogStateSaver { 26 class LogStateSaver {
27 public: 27 public:
28 LogStateSaver() : old_min_log_level_(logging::GetMinLogLevel()) {} 28 LogStateSaver() : old_min_log_level_(logging::GetMinLogLevel()) {}
29 29
30 ~LogStateSaver() { 30 ~LogStateSaver() {
31 logging::SetMinLogLevel(old_min_log_level_); 31 logging::SetMinLogLevel(old_min_log_level_);
32 logging::SetLogAssertHandler(nullptr);
32 } 33 }
33 34
34 private: 35 private:
35 int old_min_log_level_; 36 int old_min_log_level_;
36 37
37 DISALLOW_COPY_AND_ASSIGN(LogStateSaver); 38 DISALLOW_COPY_AND_ASSIGN(LogStateSaver);
38 }; 39 };
39 40
40 } // namespace 41 } // namespace
41 42
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after
720 histogram->Add(3); 721 histogram->Add(3);
721 histogram->Add(5); 722 histogram->Add(5);
722 StatisticsRecorder::ImportProvidedHistograms(); 723 StatisticsRecorder::ImportProvidedHistograms();
723 snapshot = found->SnapshotSamples(); 724 snapshot = found->SnapshotSamples();
724 EXPECT_EQ(3, snapshot->TotalCount()); 725 EXPECT_EQ(3, snapshot->TotalCount());
725 EXPECT_EQ(2, snapshot->GetCount(3)); 726 EXPECT_EQ(2, snapshot->GetCount(3));
726 EXPECT_EQ(1, snapshot->GetCount(5)); 727 EXPECT_EQ(1, snapshot->GetCount(5));
727 } 728 }
728 729
729 } // namespace base 730 } // namespace base
OLDNEW
« no previous file with comments | « base/logging_unittest.cc ('k') | base/strings/string_piece.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698