Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(692)

Side by Side Diff: snapshot/win/process_reader_win_test.cc

Issue 1349313003: win: support x64 reading x86 (wow64) (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: mac Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « snapshot/win/process_reader_win.cc ('k') | snapshot/win/thread_snapshot_win.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « snapshot/win/process_reader_win.cc ('k') | snapshot/win/thread_snapshot_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698