| OLD | NEW |
| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 const base::string16& directory_modification) { | 50 const base::string16& directory_modification) { |
| 51 // Spawn a child process, passing it the pipe name to connect to. | 51 // Spawn a child process, passing it the pipe name to connect to. |
| 52 base::FilePath test_executable = TestPaths::Executable(); | 52 base::FilePath test_executable = TestPaths::Executable(); |
| 53 std::wstring child_test_executable = | 53 std::wstring child_test_executable = |
| 54 test_executable.DirName() | 54 test_executable.DirName() |
| 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 ASSERT_NO_FATAL_FAILURE(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 CheckedReadFileExactly(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 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 |
| OLD | NEW |