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

Side by Side Diff: third_party/crashpad/crashpad/util/win/process_info_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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 .value(); 149 .value();
150 150
151 std::wstring args; 151 std::wstring args;
152 AppendCommandLineArgument(done_uuid.ToString16(), &args); 152 AppendCommandLineArgument(done_uuid.ToString16(), &args);
153 153
154 ChildLauncher child(child_test_executable, args); 154 ChildLauncher child(child_test_executable, args);
155 child.Start(); 155 child.Start();
156 156
157 // The child sends us a code address we can look up in the memory map. 157 // The child sends us a code address we can look up in the memory map.
158 WinVMAddress code_address; 158 WinVMAddress code_address;
159 CheckedReadFile( 159 CheckedReadFileExactly(
160 child.stdout_read_handle(), &code_address, sizeof(code_address)); 160 child.stdout_read_handle(), &code_address, sizeof(code_address));
161 161
162 ASSERT_TRUE(process_info.Initialize(child.process_handle())); 162 ASSERT_TRUE(process_info.Initialize(child.process_handle()));
163 163
164 // Tell the test it's OK to shut down now that we've read our data. 164 // Tell the test it's OK to shut down now that we've read our data.
165 EXPECT_TRUE(SetEvent(done.get())); 165 EXPECT_TRUE(SetEvent(done.get()));
166 166
167 std::vector<ProcessInfo::Module> modules; 167 std::vector<ProcessInfo::Module> modules;
168 EXPECT_TRUE(process_info.Modules(&modules)); 168 EXPECT_TRUE(process_info.Modules(&modules));
169 ASSERT_GE(modules.size(), 3u); 169 ASSERT_GE(modules.size(), 3u);
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 EXPECT_TRUE( 641 EXPECT_TRUE(
642 info.LoggingRangeIsFullyReadable(CheckedRange<WinVMAddress, WinVMSize>( 642 info.LoggingRangeIsFullyReadable(CheckedRange<WinVMAddress, WinVMSize>(
643 reinterpret_cast<WinVMAddress>(safe_memory.get()), kAllocationSize))); 643 reinterpret_cast<WinVMAddress>(safe_memory.get()), kAllocationSize)));
644 EXPECT_FALSE(info.LoggingRangeIsFullyReadable( 644 EXPECT_FALSE(info.LoggingRangeIsFullyReadable(
645 CheckedRange<WinVMAddress, WinVMSize>(0, 1024))); 645 CheckedRange<WinVMAddress, WinVMSize>(0, 1024)));
646 } 646 }
647 647
648 } // namespace 648 } // namespace
649 } // namespace test 649 } // namespace test
650 } // namespace crashpad 650 } // namespace crashpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698