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

Side by Side Diff: components/crash/content/app/crash_keys_win_unittest.cc

Issue 1513043002: clang/win: Let remaining chromium_code targets build with -Wextra. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/content/app/crash_keys_win.h" 5 #include "components/crash/content/app/crash_keys_win.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_path.h" 8 #include "base/files/file_path.h"
9 #include "base/strings/stringprintf.h" 9 #include "base/strings/stringprintf.h"
10 #include "breakpad/src/client/windows/common/ipc_protocol.h" 10 #include "breakpad/src/client/windows/common/ipc_protocol.h"
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 L"temporary", 122 L"temporary",
123 &cmd_line, 123 &cmd_line,
124 &crash_client_); 124 &crash_client_);
125 125
126 ASSERT_TRUE(info != NULL); 126 ASSERT_TRUE(info != NULL);
127 ASSERT_TRUE(info->entries != NULL); 127 ASSERT_TRUE(info->entries != NULL);
128 128
129 // We expect 7 fixed keys and a "freeboard" of 256 keys for dynamic entries. 129 // We expect 7 fixed keys and a "freeboard" of 256 keys for dynamic entries.
130 EXPECT_EQ(256U + 7U, info->count); 130 EXPECT_EQ(256U + 7U, info->count);
131 131
132 EXPECT_EQ(1, CountKeyValueOccurences(info, L"ver", L"1.2.3.4")); 132 EXPECT_EQ(1u, CountKeyValueOccurences(info, L"ver", L"1.2.3.4"));
133 EXPECT_EQ(1, CountKeyValueOccurences(info, L"prod", L"SomeProdName")); 133 EXPECT_EQ(1u, CountKeyValueOccurences(info, L"prod", L"SomeProdName"));
134 EXPECT_EQ(1, CountKeyValueOccurences(info, L"plat", L"Win32")); 134 EXPECT_EQ(1u, CountKeyValueOccurences(info, L"plat", L"Win32"));
135 EXPECT_EQ(1, CountKeyValueOccurences(info, L"ptype", L"made_up_type")); 135 EXPECT_EQ(1u, CountKeyValueOccurences(info, L"ptype", L"made_up_type"));
136 std::wstring pid_str(base::StringPrintf(L"%d", ::GetCurrentProcessId())); 136 std::wstring pid_str(base::StringPrintf(L"%d", ::GetCurrentProcessId()));
137 EXPECT_EQ(1, CountKeyValueOccurences(info, L"pid", pid_str.c_str())); 137 EXPECT_EQ(1u, CountKeyValueOccurences(info, L"pid", pid_str.c_str()));
138 EXPECT_EQ(1, CountKeyValueOccurences(info, L"channel", L"-devm")); 138 EXPECT_EQ(1u, CountKeyValueOccurences(info, L"channel", L"-devm"));
139 EXPECT_EQ(1, CountKeyValueOccurences(info, L"profile-type", L"temporary")); 139 EXPECT_EQ(1u, CountKeyValueOccurences(info, L"profile-type", L"temporary"));
140 EXPECT_EQ(256, CountKeyValueOccurences(info, L"unspecified-crash-key", L"")); 140 EXPECT_EQ(256u, CountKeyValueOccurences(info, L"unspecified-crash-key", L""));
141 } 141 }
142 142
143 } // namespace breakpad 143 } // namespace breakpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698