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

Side by Side Diff: third_party/crashpad/crashpad/snapshot/win/pe_image_annotations_reader_test.cc

Issue 2773813002: Update Crashpad to 8e37886d418dd042c3c7bfadac99214739ee4d98 (Closed)
Patch Set: Update Crashpad to 8e37886d418dd042c3c7bfadac99214739ee4d98 Created 3 years, 9 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
OLDNEW
1 // Copyright 2015 The Crashpad Authors. All rights reserved. 1 // Copyright 2015 The Crashpad Authors. All rights reserved.
2 // 2 //
3 // Licensed under the Apache License, Version 2.0 (the "License"); 3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License. 4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at 5 // You may obtain a copy of the License at
6 // 6 //
7 // http://www.apache.org/licenses/LICENSE-2.0 7 // http://www.apache.org/licenses/LICENSE-2.0
8 // 8 //
9 // Unless required by applicable law or agreed to in writing, software 9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS, 10 // distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 .Append(directory_modification) 55 .Append(directory_modification)
56 .Append(test_executable.BaseName().RemoveFinalExtension().value() + 56 .Append(test_executable.BaseName().RemoveFinalExtension().value() +
57 L"_simple_annotations.exe") 57 L"_simple_annotations.exe")
58 .value(); 58 .value();
59 ChildLauncher child(child_test_executable, L""); 59 ChildLauncher child(child_test_executable, L"");
60 child.Start(); 60 child.Start();
61 61
62 // Wait for the child process to indicate that it's done setting up its 62 // Wait for the child process to indicate that it's done setting up its
63 // annotations via the CrashpadInfo interface. 63 // annotations via the CrashpadInfo interface.
64 char c; 64 char c;
65 CheckedReadFile(child.stdout_read_handle(), &c, sizeof(c)); 65 CheckedReadFileExactly(child.stdout_read_handle(), &c, sizeof(c));
66 66
67 ProcessReaderWin process_reader; 67 ProcessReaderWin process_reader;
68 ASSERT_TRUE(process_reader.Initialize(child.process_handle(), 68 ASSERT_TRUE(process_reader.Initialize(child.process_handle(),
69 ProcessSuspensionState::kRunning)); 69 ProcessSuspensionState::kRunning));
70 70
71 // Verify the "simple map" annotations set via the CrashpadInfo interface. 71 // Verify the "simple map" annotations set via the CrashpadInfo interface.
72 const std::vector<ProcessInfo::Module>& modules = process_reader.Modules(); 72 const std::vector<ProcessInfo::Module>& modules = process_reader.Modules();
73 std::map<std::string, std::string> all_annotations_simple_map; 73 std::map<std::string, std::string> all_annotations_simple_map;
74 for (const ProcessInfo::Module& module : modules) { 74 for (const ProcessInfo::Module& module : modules) {
75 PEImageReader pe_image_reader; 75 PEImageReader pe_image_reader;
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 #else 135 #else
136 TestAnnotationsOnCrash(kCrashDebugBreak, 136 TestAnnotationsOnCrash(kCrashDebugBreak,
137 FILE_PATH_LITERAL("..\\..\\out\\Release")); 137 FILE_PATH_LITERAL("..\\..\\out\\Release"));
138 #endif 138 #endif
139 } 139 }
140 #endif // ARCH_CPU_64_BITS 140 #endif // ARCH_CPU_64_BITS
141 141
142 } // namespace 142 } // namespace
143 } // namespace test 143 } // namespace test
144 } // namespace crashpad 144 } // namespace crashpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698