OLD | NEW |
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" |
| 6 |
5 #include <string> | 7 #include <string> |
6 | 8 |
7 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
8 #include "base/metrics/histogram_base.h" | 10 #include "base/metrics/histogram_base.h" |
9 #include "base/metrics/histogram_samples.h" | 11 #include "base/metrics/histogram_samples.h" |
10 #include "base/metrics/sample_map.h" | 12 #include "base/metrics/sample_map.h" |
11 #include "base/metrics/sparse_histogram.h" | |
12 #include "base/metrics/statistics_recorder.h" | 13 #include "base/metrics/statistics_recorder.h" |
13 #include "base/pickle.h" | 14 #include "base/pickle.h" |
14 #include "base/strings/stringprintf.h" | 15 #include "base/strings/stringprintf.h" |
15 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
16 | 17 |
17 namespace base { | 18 namespace base { |
18 | 19 |
19 class SparseHistogramTest : public testing::Test { | 20 class SparseHistogramTest : public testing::Test { |
20 protected: | 21 protected: |
21 void SetUp() override { | 22 void SetUp() override { |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 | 121 |
121 int flag; | 122 int flag; |
122 EXPECT_TRUE(iter.ReadInt(&flag)); | 123 EXPECT_TRUE(iter.ReadInt(&flag)); |
123 EXPECT_EQ(HistogramBase::kIPCSerializationSourceFlag, flag); | 124 EXPECT_EQ(HistogramBase::kIPCSerializationSourceFlag, flag); |
124 | 125 |
125 // No more data in the pickle. | 126 // No more data in the pickle. |
126 EXPECT_FALSE(iter.SkipBytes(1)); | 127 EXPECT_FALSE(iter.SkipBytes(1)); |
127 } | 128 } |
128 | 129 |
129 } // namespace base | 130 } // namespace base |
OLD | NEW |