| OLD | NEW |
| 1 // Copyright 2016 The Crashpad Authors. All rights reserved. | 1 // Copyright 2016 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 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 const base::string16& directory_modification) { | 46 const base::string16& directory_modification) { |
| 47 // Spawn a child process, passing it the pipe name to connect to. | 47 // Spawn a child process, passing it the pipe name to connect to. |
| 48 base::FilePath test_executable = TestPaths::Executable(); | 48 base::FilePath test_executable = TestPaths::Executable(); |
| 49 std::wstring child_test_executable = | 49 std::wstring child_test_executable = |
| 50 test_executable.DirName() | 50 test_executable.DirName() |
| 51 .Append(directory_modification) | 51 .Append(directory_modification) |
| 52 .Append(test_executable.BaseName().RemoveFinalExtension().value() + | 52 .Append(test_executable.BaseName().RemoveFinalExtension().value() + |
| 53 L"_extra_memory_ranges.exe") | 53 L"_extra_memory_ranges.exe") |
| 54 .value(); | 54 .value(); |
| 55 ChildLauncher child(child_test_executable, L""); | 55 ChildLauncher child(child_test_executable, L""); |
| 56 child.Start(); | 56 ASSERT_NO_FATAL_FAILURE(child.Start()); |
| 57 | 57 |
| 58 // Wait for the child process to indicate that it's done setting up its | 58 // Wait for the child process to indicate that it's done setting up its |
| 59 // annotations via the CrashpadInfo interface. | 59 // annotations via the CrashpadInfo interface. |
| 60 char c; | 60 char c; |
| 61 CheckedReadFileExactly(child.stdout_read_handle(), &c, sizeof(c)); | 61 CheckedReadFileExactly(child.stdout_read_handle(), &c, sizeof(c)); |
| 62 | 62 |
| 63 ProcessSnapshotWin snapshot; | 63 ProcessSnapshotWin snapshot; |
| 64 ASSERT_TRUE(snapshot.Initialize( | 64 ASSERT_TRUE(snapshot.Initialize( |
| 65 child.process_handle(), ProcessSuspensionState::kRunning, 0, 0)); | 65 child.process_handle(), ProcessSuspensionState::kRunning, 0, 0)); |
| 66 | 66 |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 #else | 124 #else |
| 125 TestExtraMemoryRanges(kCrashDebugBreak, | 125 TestExtraMemoryRanges(kCrashDebugBreak, |
| 126 FILE_PATH_LITERAL("..\\..\\out\\Release")); | 126 FILE_PATH_LITERAL("..\\..\\out\\Release")); |
| 127 #endif | 127 #endif |
| 128 } | 128 } |
| 129 #endif // ARCH_CPU_64_BITS | 129 #endif // ARCH_CPU_64_BITS |
| 130 | 130 |
| 131 } // namespace | 131 } // namespace |
| 132 } // namespace test | 132 } // namespace test |
| 133 } // namespace crashpad | 133 } // namespace crashpad |
| OLD | NEW |