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

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

Issue 1466413002: Update gtest to 786564fa4a3c, switch to googlemock in gtest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 unified diff | Download patch
« no previous file with comments | « base/metrics/sample_vector_unittest.cc ('k') | base/metrics/statistics_recorder_unittest.cc » ('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/sparse_histogram.h" 5 #include "base/metrics/sparse_histogram.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/metrics/histogram_base.h" 10 #include "base/metrics/histogram_base.h"
11 #include "base/metrics/histogram_samples.h" 11 #include "base/metrics/histogram_samples.h"
12 #include "base/metrics/sample_map.h" 12 #include "base/metrics/sample_map.h"
13 #include "base/metrics/statistics_recorder.h" 13 #include "base/metrics/statistics_recorder.h"
14 #include "base/pickle.h" 14 #include "base/pickle.h"
15 #include "base/strings/stringprintf.h" 15 #include "base/strings/stringprintf.h"
16 #include "testing/gtest/include/gtest/gtest.h" 16 #include "testing/gtest/googletest/include/gtest/gtest.h"
17 17
18 namespace base { 18 namespace base {
19 19
20 class SparseHistogramTest : public testing::Test { 20 class SparseHistogramTest : public testing::Test {
21 protected: 21 protected:
22 void SetUp() override { 22 void SetUp() override {
23 // Each test will have a clean state (no Histogram / BucketRanges 23 // Each test will have a clean state (no Histogram / BucketRanges
24 // registered). 24 // registered).
25 InitializeStatisticsRecorder(); 25 InitializeStatisticsRecorder();
26 } 26 }
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
140 140
141 int flag; 141 int flag;
142 EXPECT_TRUE(iter.ReadInt(&flag)); 142 EXPECT_TRUE(iter.ReadInt(&flag));
143 EXPECT_EQ(HistogramBase::kIPCSerializationSourceFlag, flag); 143 EXPECT_EQ(HistogramBase::kIPCSerializationSourceFlag, flag);
144 144
145 // No more data in the pickle. 145 // No more data in the pickle.
146 EXPECT_FALSE(iter.SkipBytes(1)); 146 EXPECT_FALSE(iter.SkipBytes(1));
147 } 147 }
148 148
149 } // namespace base 149 } // namespace base
OLDNEW
« no previous file with comments | « base/metrics/sample_vector_unittest.cc ('k') | base/metrics/statistics_recorder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698