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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 EXPECT_EQ(2, SuspendCount(child_task)); | 64 EXPECT_EQ(2, SuspendCount(child_task)); |
65 } | 65 } |
66 | 66 |
67 EXPECT_EQ(1, SuspendCount(child_task)); | 67 EXPECT_EQ(1, SuspendCount(child_task)); |
68 } | 68 } |
69 | 69 |
70 EXPECT_EQ(0, SuspendCount(child_task)); | 70 EXPECT_EQ(0, SuspendCount(child_task)); |
71 } | 71 } |
72 | 72 |
73 void MachMultiprocessChild() override { | 73 void MachMultiprocessChild() override { |
74 CheckedReadFDAtEOF(ReadPipeFD()); | |
75 } | 74 } |
76 | 75 |
77 DISALLOW_COPY_AND_ASSIGN(ScopedTaskSuspendTest); | 76 DISALLOW_COPY_AND_ASSIGN(ScopedTaskSuspendTest); |
78 }; | 77 }; |
79 | 78 |
80 TEST(ScopedTaskSuspend, ScopedTaskSuspend) { | 79 TEST(ScopedTaskSuspend, ScopedTaskSuspend) { |
81 ScopedTaskSuspendTest scoped_task_suspend_test; | 80 ScopedTaskSuspendTest scoped_task_suspend_test; |
82 scoped_task_suspend_test.Run(); | 81 scoped_task_suspend_test.Run(); |
83 } | 82 } |
84 | 83 |
85 } // namespace | 84 } // namespace |
86 } // namespace test | 85 } // namespace test |
87 } // namespace crashpad | 86 } // namespace crashpad |
OLD | NEW |