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 "chromeos/network/network_event_log.h" | 5 #include "chromeos/network/network_event_log.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
11 #include "base/format_macros.h" | 11 #include "base/format_macros.h" |
12 #include "base/string_split.h" | |
13 #include "base/stringprintf.h" | 12 #include "base/stringprintf.h" |
| 13 #include "base/strings/string_split.h" |
14 #include "testing/gtest/include/gtest/gtest.h" | 14 #include "testing/gtest/include/gtest/gtest.h" |
15 | 15 |
16 namespace chromeos { | 16 namespace chromeos { |
17 | 17 |
18 class NetworkEventLogTest : public testing::Test { | 18 class NetworkEventLogTest : public testing::Test { |
19 public: | 19 public: |
20 NetworkEventLogTest() { | 20 NetworkEventLogTest() { |
21 } | 21 } |
22 | 22 |
23 virtual void SetUp() OVERRIDE { | 23 virtual void SetUp() OVERRIDE { |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 network_event_log::kMaxNetworkEventLogEntries + 3; | 99 network_event_log::kMaxNetworkEventLogEntries + 3; |
100 for (size_t i = 0; i < entries_to_add; ++i) | 100 for (size_t i = 0; i < entries_to_add; ++i) |
101 network_event_log::AddEntry("test", StringPrintf("event_%"PRIuS, i), ""); | 101 network_event_log::AddEntry("test", StringPrintf("event_%"PRIuS, i), ""); |
102 | 102 |
103 std::string output = GetAsString(network_event_log::OLDEST_FIRST, 0); | 103 std::string output = GetAsString(network_event_log::OLDEST_FIRST, 0); |
104 size_t output_lines = CountLines(output); | 104 size_t output_lines = CountLines(output); |
105 EXPECT_EQ(network_event_log::kMaxNetworkEventLogEntries, output_lines); | 105 EXPECT_EQ(network_event_log::kMaxNetworkEventLogEntries, output_lines); |
106 } | 106 } |
107 | 107 |
108 } // namespace chromeos | 108 } // namespace chromeos |
OLD | NEW |