OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "components/crash/core/common/crash_keys.h" | 5 #include "components/crash/core/common/crash_keys.h" |
6 | 6 |
| 7 #include <stddef.h> |
| 8 |
7 #include <map> | 9 #include <map> |
8 #include <string> | 10 #include <string> |
9 | 11 |
10 #include "base/command_line.h" | 12 #include "base/command_line.h" |
11 #include "base/compiler_specific.h" | 13 #include "base/compiler_specific.h" |
12 #include "base/debug/crash_logging.h" | 14 #include "base/debug/crash_logging.h" |
13 #include "base/format_macros.h" | 15 #include "base/format_macros.h" |
14 #include "base/strings/string_piece.h" | 16 #include "base/strings/string_piece.h" |
15 #include "base/strings/stringprintf.h" | 17 #include "base/strings/stringprintf.h" |
16 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
131 | 133 |
132 // If the boring keys are filtered out, every single key should now be | 134 // If the boring keys are filtered out, every single key should now be |
133 // not-boring. | 135 // not-boring. |
134 for (size_t i = 1; i <= kSwitchesMaxCount; ++i) { | 136 for (size_t i = 1; i <= kSwitchesMaxCount; ++i) { |
135 std::string switch_name = base::StringPrintf(crash_keys::kSwitchFormat, i); | 137 std::string switch_name = base::StringPrintf(crash_keys::kSwitchFormat, i); |
136 std::string switch_value = base::StringPrintf("--not-boring-%" PRIuS, i); | 138 std::string switch_value = base::StringPrintf("--not-boring-%" PRIuS, i); |
137 EXPECT_EQ(switch_value, GetKeyValue(switch_name)) << "switch_name is " << | 139 EXPECT_EQ(switch_value, GetKeyValue(switch_name)) << "switch_name is " << |
138 switch_name; | 140 switch_name; |
139 } | 141 } |
140 } | 142 } |
OLD | NEW |