| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 const std::vector<ProcessReaderWin::Thread>& threads = | 101 const std::vector<ProcessReaderWin::Thread>& threads = |
| 102 process_reader.Threads(); | 102 process_reader.Threads(); |
| 103 | 103 |
| 104 // If other tests ran in this process previously, threads may have been | 104 // If other tests ran in this process previously, threads may have been |
| 105 // created and may still be running. This check must look for at least one | 105 // created and may still be running. This check must look for at least one |
| 106 // thread, not exactly one thread. | 106 // thread, not exactly one thread. |
| 107 ASSERT_GE(threads.size(), 1u); | 107 ASSERT_GE(threads.size(), 1u); |
| 108 | 108 |
| 109 EXPECT_EQ(GetCurrentThreadId(), threads[0].id); | 109 EXPECT_EQ(GetCurrentThreadId(), threads[0].id); |
| 110 #if defined(ARCH_CPU_64_BITS) | 110 #if defined(ARCH_CPU_64_BITS) |
| 111 EXPECT_NE(0, threads[0].context.Rip); | 111 EXPECT_NE(0, threads[0].context.native.Rip); |
| 112 #else | 112 #else |
| 113 EXPECT_NE(0u, threads[0].context.Eip); | 113 EXPECT_NE(0u, threads[0].context.native.Eip); |
| 114 #endif | 114 #endif |
| 115 | 115 |
| 116 EXPECT_EQ(0, threads[0].suspend_count); | 116 EXPECT_EQ(0, threads[0].suspend_count); |
| 117 } | 117 } |
| 118 | 118 |
| 119 class ProcessReaderChildThreadSuspendCount final : public WinMultiprocess { | 119 class ProcessReaderChildThreadSuspendCount final : public WinMultiprocess { |
| 120 public: | 120 public: |
| 121 ProcessReaderChildThreadSuspendCount() : WinMultiprocess() {} | 121 ProcessReaderChildThreadSuspendCount() : WinMultiprocess() {} |
| 122 ~ProcessReaderChildThreadSuspendCount() {} | 122 ~ProcessReaderChildThreadSuspendCount() {} |
| 123 | 123 |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 DISALLOW_COPY_AND_ASSIGN(ProcessReaderChildThreadSuspendCount); | 198 DISALLOW_COPY_AND_ASSIGN(ProcessReaderChildThreadSuspendCount); |
| 199 }; | 199 }; |
| 200 | 200 |
| 201 TEST(ProcessReaderWin, ChildThreadSuspendCounts) { | 201 TEST(ProcessReaderWin, ChildThreadSuspendCounts) { |
| 202 WinMultiprocess::Run<ProcessReaderChildThreadSuspendCount>(); | 202 WinMultiprocess::Run<ProcessReaderChildThreadSuspendCount>(); |
| 203 } | 203 } |
| 204 | 204 |
| 205 } // namespace | 205 } // namespace |
| 206 } // namespace test | 206 } // namespace test |
| 207 } // namespace crashpad | 207 } // namespace crashpad |
| OLD | NEW |