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/stringprintf.h" | |
13 #include "base/strings/string_split.h" | 12 #include "base/strings/string_split.h" |
| 13 #include "base/strings/stringprintf.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 namespace network_event_log { | 17 namespace network_event_log { |
18 | 18 |
19 namespace { | 19 namespace { |
20 | 20 |
21 network_event_log::LogLevel kDefaultLevel = network_event_log::LOG_LEVEL_EVENT; | 21 network_event_log::LogLevel kDefaultLevel = network_event_log::LOG_LEVEL_EVENT; |
22 | 22 |
23 } // namespace | 23 } // namespace |
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 AddTestEvent(LOG_LEVEL_ERROR, "error3"); | 235 AddTestEvent(LOG_LEVEL_ERROR, "error3"); |
236 AddTestEvent(LOG_LEVEL_ERROR, "error4"); | 236 AddTestEvent(LOG_LEVEL_ERROR, "error4"); |
237 AddTestEvent(LOG_LEVEL_EVENT, "event5"); | 237 AddTestEvent(LOG_LEVEL_EVENT, "event5"); |
238 AddTestEvent(LOG_LEVEL_EVENT, "event6"); | 238 AddTestEvent(LOG_LEVEL_EVENT, "event6"); |
239 EXPECT_EQ("error3\nerror4\nevent5\nevent6\n", network_event_log::GetAsString( | 239 EXPECT_EQ("error3\nerror4\nevent5\nevent6\n", network_event_log::GetAsString( |
240 OLDEST_FIRST, "", LOG_LEVEL_DEBUG, 0)); | 240 OLDEST_FIRST, "", LOG_LEVEL_DEBUG, 0)); |
241 } | 241 } |
242 | 242 |
243 } // namespace network_event_log | 243 } // namespace network_event_log |
244 } // namespace chromeos | 244 } // namespace chromeos |
OLD | NEW |