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

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

Issue 2643273002: Grab system and process memory stats into crash keys in fallback handler. (Closed)
Patch Set: Created 3 years, 11 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 | « components/crash/content/app/fallback_crash_handler_win.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/fallback_crash_handler_win.h" 5 #include "components/crash/content/app/fallback_crash_handler_win.h"
6 6
7 #include "base/base_switches.h" 7 #include "base/base_switches.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 EXPECT_NE(parameters.end(), it); 220 EXPECT_NE(parameters.end(), it);
221 #if defined(ARCH_CPU_64_BITS) 221 #if defined(ARCH_CPU_64_BITS)
222 EXPECT_EQ("Win64", it->second); 222 EXPECT_EQ("Win64", it->second);
223 #else 223 #else
224 EXPECT_EQ("Win32", it->second); 224 EXPECT_EQ("Win32", it->second);
225 #endif 225 #endif
226 226
227 it = parameters.find("ptype"); 227 it = parameters.find("ptype");
228 EXPECT_NE(parameters.end(), it); 228 EXPECT_NE(parameters.end(), it);
229 EXPECT_EQ(kProcessType, it->second); 229 EXPECT_EQ(kProcessType, it->second);
230
231 uint64_t int_value;
232 it = parameters.find("ProcessPrivateUsage");
233 EXPECT_NE(parameters.end(), it);
234 EXPECT_TRUE(base::StringToUint64(it->second, &int_value));
235 EXPECT_NE(0U, int_value);
236
237 it = parameters.find("ProcessPeakWorkingSetSize");
238 EXPECT_NE(parameters.end(), it);
239 EXPECT_TRUE(base::StringToUint64(it->second, &int_value));
240 EXPECT_NE(0U, int_value);
241
242 it = parameters.find("SystemCommitRemaining");
243 EXPECT_NE(parameters.end(), it);
244 EXPECT_TRUE(base::StringToUint64(it->second, &int_value));
245 // TODO(siggi): disable if this flakes, though bots shouldn't be that hard up
246 // on memory :).
247 EXPECT_NE(0U, int_value);
248
249 it = parameters.find("SystemCommitLimit");
250 EXPECT_NE(parameters.end(), it);
251 EXPECT_TRUE(base::StringToUint64(it->second, &int_value));
252 EXPECT_NE(0U, int_value);
230 } 253 }
231 254
232 } // namespace crash_reporter 255 } // namespace crash_reporter
OLDNEW
« no previous file with comments | « components/crash/content/app/fallback_crash_handler_win.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698