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

Side by Side Diff: third_party/crashpad/crashpad/util/mach/exc_client_variants_test.cc

Issue 2555353002: Update Crashpad to 32981a3ee9d7c2769fb27afa038fe2e194cfa329 (Closed)
Patch Set: fix readme Created 4 years 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
OLDNEW
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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 EXPECT_NE(nullptr, old_state); 108 EXPECT_NE(nullptr, old_state);
109 EXPECT_EQ(implicit_cast<mach_msg_type_number_t>(THREAD_STATE_MAX), 109 EXPECT_EQ(implicit_cast<mach_msg_type_number_t>(THREAD_STATE_MAX),
110 *new_state_count); 110 *new_state_count);
111 EXPECT_NE(nullptr, new_state); 111 EXPECT_NE(nullptr, new_state);
112 112
113 for (size_t index = 0; index < old_state_count; ++index) { 113 for (size_t index = 0; index < old_state_count; ++index) {
114 EXPECT_EQ(index, old_state[index]); 114 EXPECT_EQ(index, old_state[index]);
115 } 115 }
116 116
117 // Use a flavor known to be different from the incoming flavor, for a test 117 // Use a flavor known to be different from the incoming flavor, for a test
118 // of the “out” side of the inout flavor parameter. 118 // of the “out” side of the in-out flavor parameter.
119 *flavor = exception_ + 20; 119 *flavor = exception_ + 20;
120 *new_state_count = MACHINE_THREAD_STATE_COUNT; 120 *new_state_count = MACHINE_THREAD_STATE_COUNT;
121 121
122 // Send a new state back to the client. 122 // Send a new state back to the client.
123 for (size_t index = 0; index < *new_state_count; ++index) { 123 for (size_t index = 0; index < *new_state_count; ++index) {
124 new_state[index] = MACHINE_THREAD_STATE_COUNT - index; 124 new_state[index] = MACHINE_THREAD_STATE_COUNT - index;
125 } 125 }
126 } else { 126 } else {
127 EXPECT_EQ(THREAD_STATE_NONE, *flavor); 127 EXPECT_EQ(THREAD_STATE_NONE, *flavor);
128 EXPECT_EQ(0u, old_state_count); 128 EXPECT_EQ(0u, old_state_count);
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 288
289 TestExcClientVariants test_exc_client_variants(behavior, true); 289 TestExcClientVariants test_exc_client_variants(behavior, true);
290 test_exc_client_variants.Run(); 290 test_exc_client_variants.Run();
291 } 291 }
292 } 292 }
293 } 293 }
294 294
295 } // namespace 295 } // namespace
296 } // namespace test 296 } // namespace test
297 } // namespace crashpad 297 } // namespace crashpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698