| OLD | NEW |
| 1 // Copyright 2014 The Crashpad Authors. All rights reserved. | 1 // Copyright 2014 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 //! \brief Establishes the proper testing environment prior to forking. | 57 //! \brief Establishes the proper testing environment prior to forking. |
| 58 //! | 58 //! |
| 59 //! Subclasses that solely implement a test should not need to override this | 59 //! Subclasses that solely implement a test should not need to override this |
| 60 //! method. Subclasses that do not implement tests but instead implement | 60 //! method. Subclasses that do not implement tests but instead implement |
| 61 //! additional testing features on top of this class may override this method | 61 //! additional testing features on top of this class may override this method |
| 62 //! provided that they call the superclass’ implementation first as follows: | 62 //! provided that they call the superclass’ implementation first as follows: |
| 63 //! | 63 //! |
| 64 //! \code | 64 //! \code |
| 65 //! virtual void PreFork() override { | 65 //! virtual void PreFork() override { |
| 66 //! Multiprocess::PreFork(); | 66 //! Multiprocess::PreFork(); |
| 67 //! if (testing::Test::HasFatalAssertions()) { | 67 //! if (testing::Test::HasFatalFailure()) { |
| 68 //! return; | 68 //! return; |
| 69 //! } | 69 //! } |
| 70 //! | 70 //! |
| 71 //! // Place subclass-specific pre-fork code here. | 71 //! // Place subclass-specific pre-fork code here. |
| 72 //! } | 72 //! } |
| 73 //! \endcode | 73 //! \endcode |
| 74 //! | 74 //! |
| 75 //! Subclass implementations may signal failure by raising their own fatal | 75 //! Subclass implementations may signal failure by raising their own fatal |
| 76 //! gtest assertions. | 76 //! gtest assertions. |
| 77 virtual void PreFork(); | 77 virtual void PreFork(); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 131 |
| 132 internal::MultiprocessInfo* info_; | 132 internal::MultiprocessInfo* info_; |
| 133 | 133 |
| 134 DISALLOW_COPY_AND_ASSIGN(Multiprocess); | 134 DISALLOW_COPY_AND_ASSIGN(Multiprocess); |
| 135 }; | 135 }; |
| 136 | 136 |
| 137 } // namespace test | 137 } // namespace test |
| 138 } // namespace crashpad | 138 } // namespace crashpad |
| 139 | 139 |
| 140 #endif // CRASHPAD_UTIL_TEST_MULTIPROCESS_H_ | 140 #endif // CRASHPAD_UTIL_TEST_MULTIPROCESS_H_ |
| OLD | NEW |