OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/browser_watcher/postmortem_report_collector.h" | 5 #include "components/browser_watcher/postmortem_report_collector.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include <memory> | 9 #include <memory> |
10 #include <set> | 10 #include <set> |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
334 // stability data. | 334 // stability data. |
335 PostmortemReportCollector collector(kProductName, kVersionNumber, | 335 PostmortemReportCollector collector(kProductName, kVersionNumber, |
336 kChannelName, nullptr); | 336 kChannelName, nullptr); |
337 StabilityReport report; | 337 StabilityReport report; |
338 ASSERT_EQ(DEBUG_FILE_NO_DATA, collector.CollectOneReport(file_path, &report)); | 338 ASSERT_EQ(DEBUG_FILE_NO_DATA, collector.CollectOneReport(file_path, &report)); |
339 } | 339 } |
340 | 340 |
341 namespace { | 341 namespace { |
342 | 342 |
343 // Parameters for the activity tracking. | 343 // Parameters for the activity tracking. |
344 const size_t kFileSize = 2 * 1024; | 344 const size_t kFileSize = 64 << 10; // 64 KiB |
345 const int kStackDepth = 6; | 345 const int kStackDepth = 6; |
346 const uint64_t kAllocatorId = 0; | 346 const uint64_t kAllocatorId = 0; |
347 const char kAllocatorName[] = "PostmortemReportCollectorCollectionTest"; | 347 const char kAllocatorName[] = "PostmortemReportCollectorCollectionTest"; |
348 const uint64_t kTaskSequenceNum = 42; | 348 const uint64_t kTaskSequenceNum = 42; |
349 const uintptr_t kTaskOrigin = 1000U; | 349 const uintptr_t kTaskOrigin = 1000U; |
350 const uintptr_t kLockAddress = 1001U; | 350 const uintptr_t kLockAddress = 1001U; |
351 const uintptr_t kEventAddress = 1002U; | 351 const uintptr_t kEventAddress = 1002U; |
352 const int kThreadId = 43; | 352 const int kThreadId = 43; |
353 const int kProcessId = 44; | 353 const int kProcessId = 44; |
354 const int kAnotherThreadId = 45; | 354 const int kAnotherThreadId = 45; |
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 PostmortemReportCollector collector(kProductName, kVersionNumber, | 747 PostmortemReportCollector collector(kProductName, kVersionNumber, |
748 kChannelName, &analyzer); | 748 kChannelName, &analyzer); |
749 StabilityReport report; | 749 StabilityReport report; |
750 ASSERT_EQ(SUCCESS, collector.CollectOneReport(debug_file_path(), &report)); | 750 ASSERT_EQ(SUCCESS, collector.CollectOneReport(debug_file_path(), &report)); |
751 | 751 |
752 // Validate the report. | 752 // Validate the report. |
753 ASSERT_EQ(SystemState::CLEAN, report.system_state().session_state()); | 753 ASSERT_EQ(SystemState::CLEAN, report.system_state().session_state()); |
754 } | 754 } |
755 | 755 |
756 } // namespace browser_watcher | 756 } // namespace browser_watcher |
OLD | NEW |