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

Side by Side Diff: chrome/common/crash_keys_unittest.cc

Issue 1548153002: Switch to standard integer types in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 months 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 | « chrome/common/crash_keys.cc ('k') | chrome/common/descriptors_android.h » ('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 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 "chrome/common/crash_keys.h" 5 #include "chrome/common/crash_keys.h"
6 6
7 #include <map> 7 #include <map>
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 10
11 #include "base/command_line.h" 11 #include "base/command_line.h"
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "base/debug/crash_logging.h" 13 #include "base/debug/crash_logging.h"
14 #include "base/strings/string_piece.h" 14 #include "base/strings/string_piece.h"
15 #include "base/strings/stringprintf.h" 15 #include "base/strings/stringprintf.h"
16 #include "build/build_config.h"
16 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/include/gtest/gtest.h"
17 18
18 class CrashKeysTest : public testing::Test { 19 class CrashKeysTest : public testing::Test {
19 public: 20 public:
20 void SetUp() override { 21 void SetUp() override {
21 self_ = this; 22 self_ = this;
22 base::debug::SetCrashKeyReportingFunctions( 23 base::debug::SetCrashKeyReportingFunctions(
23 &SetCrashKeyValue, &ClearCrashKey); 24 &SetCrashKeyValue, &ClearCrashKey);
24 crash_keys::RegisterChromeCrashKeys(); 25 crash_keys::RegisterChromeCrashKeys();
25 } 26 }
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 #endif 134 #endif
134 135
135 crash_keys::SetCrashKeysFromCommandLine(command_line); 136 crash_keys::SetCrashKeysFromCommandLine(command_line);
136 137
137 EXPECT_EQ("--vv=1", GetKeyValue("switch-1")); 138 EXPECT_EQ("--vv=1", GetKeyValue("switch-1"));
138 EXPECT_EQ("--vvv", GetKeyValue("switch-2")); 139 EXPECT_EQ("--vvv", GetKeyValue("switch-2"));
139 EXPECT_EQ("--enable-multi-profiles", GetKeyValue("switch-3")); 140 EXPECT_EQ("--enable-multi-profiles", GetKeyValue("switch-3"));
140 EXPECT_EQ("--device-management-url=https://foo/bar", GetKeyValue("switch-4")); 141 EXPECT_EQ("--device-management-url=https://foo/bar", GetKeyValue("switch-4"));
141 EXPECT_FALSE(HasCrashKey("switch-5")); 142 EXPECT_FALSE(HasCrashKey("switch-5"));
142 } 143 }
OLDNEW
« no previous file with comments | « chrome/common/crash_keys.cc ('k') | chrome/common/descriptors_android.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698