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, |
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
12 // See the License for the specific language governing permissions and | 12 // See the License for the specific language governing permissions and |
13 // limitations under the License. | 13 // limitations under the License. |
14 | 14 |
15 #include "util/mach/exc_server_variants.h" | 15 #include "util/mach/exc_server_variants.h" |
16 | 16 |
17 #include <mach/mach.h> | 17 #include <mach/mach.h> |
18 #include <signal.h> | 18 #include <signal.h> |
19 #include <string.h> | 19 #include <string.h> |
20 | 20 |
21 #include "base/strings/stringprintf.h" | 21 #include "base/strings/stringprintf.h" |
22 #include "gmock/gmock.h" | 22 #include "gmock/gmock.h" |
23 #include "gtest/gtest.h" | 23 #include "gtest/gtest.h" |
24 #include "test/mac/mach_errors.h" | 24 #include "test/mac/mach_errors.h" |
25 #include "test/mac/mach_multiprocess.h" | 25 #include "test/mac/mach_multiprocess.h" |
26 #include "util/mach/exception_behaviors.h" | 26 #include "util/mach/exception_behaviors.h" |
27 #include "util/mach/mach_extensions.h" | |
28 #include "util/mach/mach_message.h" | 27 #include "util/mach/mach_message.h" |
29 | 28 |
30 namespace crashpad { | 29 namespace crashpad { |
31 namespace test { | 30 namespace test { |
32 namespace { | 31 namespace { |
33 | 32 |
34 using testing::DefaultValue; | 33 using testing::DefaultValue; |
35 using testing::Eq; | 34 using testing::Eq; |
36 using testing::Pointee; | 35 using testing::Pointee; |
37 using testing::Return; | 36 using testing::Return; |
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
448 EXPECT_EQ(MIG_BAD_ID, RetCode); | 447 EXPECT_EQ(MIG_BAD_ID, RetCode); |
449 } | 448 } |
450 }; | 449 }; |
451 | 450 |
452 class MockUniversalMachExcServer : public UniversalMachExcServer::Interface { | 451 class MockUniversalMachExcServer : public UniversalMachExcServer::Interface { |
453 public: | 452 public: |
454 struct ConstExceptionCodes { | 453 struct ConstExceptionCodes { |
455 const mach_exception_data_type_t* code; | 454 const mach_exception_data_type_t* code; |
456 mach_msg_type_number_t code_count; | 455 mach_msg_type_number_t code_count; |
457 }; | 456 }; |
458 struct ThreadState { | 457 struct ThreadStateAndCount { |
459 thread_state_t state; | 458 thread_state_t state; |
460 mach_msg_type_number_t* state_count; | 459 mach_msg_type_number_t* state_count; |
461 }; | 460 }; |
462 struct ConstThreadState { | 461 struct ConstThreadStateAndCount { |
463 const natural_t* state; | 462 ConstThreadState state; |
464 mach_msg_type_number_t* state_count; | 463 mach_msg_type_number_t* state_count; |
465 }; | 464 }; |
466 | 465 |
467 // UniversalMachExcServer::Interface: | 466 // UniversalMachExcServer::Interface: |
468 | 467 |
469 // CatchMachException is the method to mock, but it has 13 parameters, and | 468 // CatchMachException is the method to mock, but it has 13 parameters, and |
470 // gmock can only mock methods with up to 10 parameters. Coalesce some related | 469 // gmock can only mock methods with up to 10 parameters. Coalesce some related |
471 // parameters together into structs, and call a mocked method. | 470 // parameters together into structs, and call a mocked method. |
472 virtual kern_return_t CatchMachException( | 471 virtual kern_return_t CatchMachException( |
473 exception_behavior_t behavior, | 472 exception_behavior_t behavior, |
474 exception_handler_t exception_port, | 473 exception_handler_t exception_port, |
475 thread_t thread, | 474 thread_t thread, |
476 task_t task, | 475 task_t task, |
477 exception_type_t exception, | 476 exception_type_t exception, |
478 const mach_exception_data_type_t* code, | 477 const mach_exception_data_type_t* code, |
479 mach_msg_type_number_t code_count, | 478 mach_msg_type_number_t code_count, |
480 thread_state_flavor_t* flavor, | 479 thread_state_flavor_t* flavor, |
481 const natural_t* old_state, | 480 ConstThreadState old_state, |
482 mach_msg_type_number_t old_state_count, | 481 mach_msg_type_number_t old_state_count, |
483 thread_state_t new_state, | 482 thread_state_t new_state, |
484 mach_msg_type_number_t* new_state_count, | 483 mach_msg_type_number_t* new_state_count, |
485 const mach_msg_trailer_t* trailer, | 484 const mach_msg_trailer_t* trailer, |
486 bool* destroy_complex_request) override { | 485 bool* destroy_complex_request) override { |
487 *destroy_complex_request = true; | 486 *destroy_complex_request = true; |
488 const ConstExceptionCodes exception_codes = {code, code_count}; | 487 const ConstExceptionCodes exception_codes = {code, code_count}; |
489 const ConstThreadState old_thread_state = {old_state, &old_state_count}; | 488 const ConstThreadStateAndCount old_thread_state = {old_state, |
490 ThreadState new_thread_state = {new_state, new_state_count}; | 489 &old_state_count}; |
| 490 ThreadStateAndCount new_thread_state = {new_state, new_state_count}; |
491 return MockCatchMachException(behavior, | 491 return MockCatchMachException(behavior, |
492 exception_port, | 492 exception_port, |
493 thread, | 493 thread, |
494 task, | 494 task, |
495 exception, | 495 exception, |
496 &exception_codes, | 496 &exception_codes, |
497 flavor, | 497 flavor, |
498 &old_thread_state, | 498 &old_thread_state, |
499 &new_thread_state, | 499 &new_thread_state, |
500 trailer); | 500 trailer); |
501 } | 501 } |
502 | 502 |
503 MOCK_METHOD10(MockCatchMachException, | 503 MOCK_METHOD10(MockCatchMachException, |
504 kern_return_t(exception_behavior_t behavior, | 504 kern_return_t(exception_behavior_t behavior, |
505 exception_handler_t exception_port, | 505 exception_handler_t exception_port, |
506 thread_t thread, | 506 thread_t thread, |
507 task_t task, | 507 task_t task, |
508 exception_type_t exception, | 508 exception_type_t exception, |
509 const ConstExceptionCodes* exception_codes, | 509 const ConstExceptionCodes* exception_codes, |
510 thread_state_flavor_t* flavor, | 510 thread_state_flavor_t* flavor, |
511 const ConstThreadState* old_thread_state, | 511 const ConstThreadStateAndCount* old_thread_state, |
512 ThreadState* new_thread_state, | 512 ThreadStateAndCount* new_thread_state, |
513 const mach_msg_trailer_t* trailer)); | 513 const mach_msg_trailer_t* trailer)); |
514 }; | 514 }; |
515 | 515 |
516 // Matcher for ConstExceptionCodes, testing that it carries 2 codes matching | 516 // Matcher for ConstExceptionCodes, testing that it carries 2 codes matching |
517 // code_0 and code_1. | 517 // code_0 and code_1. |
518 MATCHER_P2(AreExceptionCodes, code_0, code_1, "") { | 518 MATCHER_P2(AreExceptionCodes, code_0, code_1, "") { |
519 if (!arg) { | 519 if (!arg) { |
520 return false; | 520 return false; |
521 } | 521 } |
522 | 522 |
523 if (arg->code_count == 2 && arg->code[0] == code_0 && | 523 if (arg->code_count == 2 && arg->code[0] == code_0 && |
524 arg->code[1] == code_1) { | 524 arg->code[1] == code_1) { |
525 return true; | 525 return true; |
526 } | 526 } |
527 | 527 |
528 *result_listener << "codes ("; | 528 *result_listener << "codes ("; |
529 for (size_t index = 0; index < arg->code_count; ++index) { | 529 for (size_t index = 0; index < arg->code_count; ++index) { |
530 *result_listener << arg->code[index]; | 530 *result_listener << arg->code[index]; |
531 if (index < arg->code_count - 1) { | 531 if (index < arg->code_count - 1) { |
532 *result_listener << ", "; | 532 *result_listener << ", "; |
533 } | 533 } |
534 } | 534 } |
535 *result_listener << ")"; | 535 *result_listener << ")"; |
536 | 536 |
537 return false; | 537 return false; |
538 } | 538 } |
539 | 539 |
540 // Matcher for ThreadState and ConstThreadState, testing that *state_count is | 540 // Matcher for ThreadStateAndCount and ConstThreadStateAndCount, testing that |
541 // present and matches the specified value. If 0 is specified for the count, | 541 // *state_count is present and matches the specified value. If 0 is specified |
542 // |state| must be nullptr (not present), otherwise |state| must not be nullptr | 542 // for the count, |state| must be nullptr (not present), otherwise |state| must |
543 // (present). | 543 // not be nullptr (present). |
544 MATCHER_P(IsThreadStateCount, state_count, "") { | 544 MATCHER_P(IsThreadStateAndCount, state_count, "") { |
545 if (!arg) { | 545 if (!arg) { |
546 return false; | 546 return false; |
547 } | 547 } |
548 if (!arg->state_count) { | 548 if (!arg->state_count) { |
549 *result_listener << "state_count nullptr"; | 549 *result_listener << "state_count nullptr"; |
550 return false; | 550 return false; |
551 } | 551 } |
552 if (*(arg->state_count) != state_count) { | 552 if (*(arg->state_count) != state_count) { |
553 *result_listener << "*state_count " << *(arg->state_count); | 553 *result_listener << "*state_count " << *(arg->state_count); |
554 return false; | 554 return false; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 | 600 |
601 EXPECT_CALL(server, | 601 EXPECT_CALL(server, |
602 MockCatchMachException(kExceptionBehavior, | 602 MockCatchMachException(kExceptionBehavior, |
603 kServerLocalPort, | 603 kServerLocalPort, |
604 kExceptionThreadPort, | 604 kExceptionThreadPort, |
605 kExceptionTaskPort, | 605 kExceptionTaskPort, |
606 kExceptionType, | 606 kExceptionType, |
607 AreExceptionCodes(kTestExceptonCodes[0], | 607 AreExceptionCodes(kTestExceptonCodes[0], |
608 kTestExceptonCodes[1]), | 608 kTestExceptonCodes[1]), |
609 Pointee(Eq(THREAD_STATE_NONE)), | 609 Pointee(Eq(THREAD_STATE_NONE)), |
610 IsThreadStateCount(0u), | 610 IsThreadStateAndCount(0u), |
611 IsThreadStateCount(0u), | 611 IsThreadStateAndCount(0u), |
612 Eq(&request.trailer))) | 612 Eq(&request.trailer))) |
613 .WillOnce(Return(KERN_SUCCESS)) | 613 .WillOnce(Return(KERN_SUCCESS)) |
614 .RetiresOnSaturation(); | 614 .RetiresOnSaturation(); |
615 | 615 |
616 bool destroy_complex_request = false; | 616 bool destroy_complex_request = false; |
617 EXPECT_TRUE(universal_mach_exc_server.MachMessageServerFunction( | 617 EXPECT_TRUE(universal_mach_exc_server.MachMessageServerFunction( |
618 reinterpret_cast<mach_msg_header_t*>(&request), | 618 reinterpret_cast<mach_msg_header_t*>(&request), |
619 reinterpret_cast<mach_msg_header_t*>(&reply), | 619 reinterpret_cast<mach_msg_header_t*>(&reply), |
620 &destroy_complex_request)); | 620 &destroy_complex_request)); |
621 EXPECT_TRUE(destroy_complex_request); | 621 EXPECT_TRUE(destroy_complex_request); |
(...skipping 24 matching lines...) Expand all Loading... |
646 EXPECT_CALL( | 646 EXPECT_CALL( |
647 server, | 647 server, |
648 MockCatchMachException( | 648 MockCatchMachException( |
649 kExceptionBehavior, | 649 kExceptionBehavior, |
650 kServerLocalPort, | 650 kServerLocalPort, |
651 THREAD_NULL, | 651 THREAD_NULL, |
652 TASK_NULL, | 652 TASK_NULL, |
653 kExceptionType, | 653 kExceptionType, |
654 AreExceptionCodes(kTestExceptonCodes[0], kTestExceptonCodes[1]), | 654 AreExceptionCodes(kTestExceptonCodes[0], kTestExceptonCodes[1]), |
655 Pointee(Eq(kThreadStateFlavor)), | 655 Pointee(Eq(kThreadStateFlavor)), |
656 IsThreadStateCount(kThreadStateFlavorCount), | 656 IsThreadStateAndCount(kThreadStateFlavorCount), |
657 IsThreadStateCount(arraysize(reply.new_state)), | 657 IsThreadStateAndCount(arraysize(reply.new_state)), |
658 Eq(request.Trailer()))) | 658 Eq(request.Trailer()))) |
659 .WillOnce(Return(KERN_SUCCESS)) | 659 .WillOnce(Return(KERN_SUCCESS)) |
660 .RetiresOnSaturation(); | 660 .RetiresOnSaturation(); |
661 | 661 |
662 bool destroy_complex_request = false; | 662 bool destroy_complex_request = false; |
663 EXPECT_TRUE(universal_mach_exc_server.MachMessageServerFunction( | 663 EXPECT_TRUE(universal_mach_exc_server.MachMessageServerFunction( |
664 reinterpret_cast<mach_msg_header_t*>(&request), | 664 reinterpret_cast<mach_msg_header_t*>(&request), |
665 reinterpret_cast<mach_msg_header_t*>(&reply), | 665 reinterpret_cast<mach_msg_header_t*>(&reply), |
666 &destroy_complex_request)); | 666 &destroy_complex_request)); |
667 | 667 |
(...skipping 27 matching lines...) Expand all Loading... |
695 EXPECT_CALL( | 695 EXPECT_CALL( |
696 server, | 696 server, |
697 MockCatchMachException( | 697 MockCatchMachException( |
698 kExceptionBehavior, | 698 kExceptionBehavior, |
699 kServerLocalPort, | 699 kServerLocalPort, |
700 kExceptionThreadPort, | 700 kExceptionThreadPort, |
701 kExceptionTaskPort, | 701 kExceptionTaskPort, |
702 kExceptionType, | 702 kExceptionType, |
703 AreExceptionCodes(kTestExceptonCodes[0], kTestExceptonCodes[1]), | 703 AreExceptionCodes(kTestExceptonCodes[0], kTestExceptonCodes[1]), |
704 Pointee(Eq(kThreadStateFlavor)), | 704 Pointee(Eq(kThreadStateFlavor)), |
705 IsThreadStateCount(kThreadStateFlavorCount), | 705 IsThreadStateAndCount(kThreadStateFlavorCount), |
706 IsThreadStateCount(arraysize(reply.new_state)), | 706 IsThreadStateAndCount(arraysize(reply.new_state)), |
707 Eq(request.Trailer()))) | 707 Eq(request.Trailer()))) |
708 .WillOnce(Return(KERN_SUCCESS)) | 708 .WillOnce(Return(KERN_SUCCESS)) |
709 .RetiresOnSaturation(); | 709 .RetiresOnSaturation(); |
710 | 710 |
711 bool destroy_complex_request = false; | 711 bool destroy_complex_request = false; |
712 EXPECT_TRUE(universal_mach_exc_server.MachMessageServerFunction( | 712 EXPECT_TRUE(universal_mach_exc_server.MachMessageServerFunction( |
713 reinterpret_cast<mach_msg_header_t*>(&request), | 713 reinterpret_cast<mach_msg_header_t*>(&request), |
714 reinterpret_cast<mach_msg_header_t*>(&reply), | 714 reinterpret_cast<mach_msg_header_t*>(&reply), |
715 &destroy_complex_request)); | 715 &destroy_complex_request)); |
716 EXPECT_TRUE(destroy_complex_request); | 716 EXPECT_TRUE(destroy_complex_request); |
(...skipping 25 matching lines...) Expand all Loading... |
742 EXPECT_CALL( | 742 EXPECT_CALL( |
743 server, | 743 server, |
744 MockCatchMachException(kExceptionBehavior, | 744 MockCatchMachException(kExceptionBehavior, |
745 kServerLocalPort, | 745 kServerLocalPort, |
746 kExceptionThreadPort, | 746 kExceptionThreadPort, |
747 kExceptionTaskPort, | 747 kExceptionTaskPort, |
748 kExceptionType, | 748 kExceptionType, |
749 AreExceptionCodes(kTestMachExceptionCodes[0], | 749 AreExceptionCodes(kTestMachExceptionCodes[0], |
750 kTestMachExceptionCodes[1]), | 750 kTestMachExceptionCodes[1]), |
751 Pointee(Eq(THREAD_STATE_NONE)), | 751 Pointee(Eq(THREAD_STATE_NONE)), |
752 IsThreadStateCount(0u), | 752 IsThreadStateAndCount(0u), |
753 IsThreadStateCount(0u), | 753 IsThreadStateAndCount(0u), |
754 Eq(&request.trailer))) | 754 Eq(&request.trailer))) |
755 .WillOnce(Return(KERN_SUCCESS)) | 755 .WillOnce(Return(KERN_SUCCESS)) |
756 .RetiresOnSaturation(); | 756 .RetiresOnSaturation(); |
757 | 757 |
758 bool destroy_complex_request = false; | 758 bool destroy_complex_request = false; |
759 EXPECT_TRUE(universal_mach_exc_server.MachMessageServerFunction( | 759 EXPECT_TRUE(universal_mach_exc_server.MachMessageServerFunction( |
760 reinterpret_cast<mach_msg_header_t*>(&request), | 760 reinterpret_cast<mach_msg_header_t*>(&request), |
761 reinterpret_cast<mach_msg_header_t*>(&reply), | 761 reinterpret_cast<mach_msg_header_t*>(&reply), |
762 &destroy_complex_request)); | 762 &destroy_complex_request)); |
763 EXPECT_TRUE(destroy_complex_request); | 763 EXPECT_TRUE(destroy_complex_request); |
(...skipping 25 matching lines...) Expand all Loading... |
789 EXPECT_CALL( | 789 EXPECT_CALL( |
790 server, | 790 server, |
791 MockCatchMachException(kExceptionBehavior, | 791 MockCatchMachException(kExceptionBehavior, |
792 kServerLocalPort, | 792 kServerLocalPort, |
793 THREAD_NULL, | 793 THREAD_NULL, |
794 TASK_NULL, | 794 TASK_NULL, |
795 kExceptionType, | 795 kExceptionType, |
796 AreExceptionCodes(kTestMachExceptionCodes[0], | 796 AreExceptionCodes(kTestMachExceptionCodes[0], |
797 kTestMachExceptionCodes[1]), | 797 kTestMachExceptionCodes[1]), |
798 Pointee(Eq(kThreadStateFlavor)), | 798 Pointee(Eq(kThreadStateFlavor)), |
799 IsThreadStateCount(kThreadStateFlavorCount), | 799 IsThreadStateAndCount(kThreadStateFlavorCount), |
800 IsThreadStateCount(arraysize(reply.new_state)), | 800 IsThreadStateAndCount(arraysize(reply.new_state)), |
801 Eq(request.Trailer()))) | 801 Eq(request.Trailer()))) |
802 .WillOnce(Return(KERN_SUCCESS)) | 802 .WillOnce(Return(KERN_SUCCESS)) |
803 .RetiresOnSaturation(); | 803 .RetiresOnSaturation(); |
804 | 804 |
805 bool destroy_complex_request = false; | 805 bool destroy_complex_request = false; |
806 EXPECT_TRUE(universal_mach_exc_server.MachMessageServerFunction( | 806 EXPECT_TRUE(universal_mach_exc_server.MachMessageServerFunction( |
807 reinterpret_cast<mach_msg_header_t*>(&request), | 807 reinterpret_cast<mach_msg_header_t*>(&request), |
808 reinterpret_cast<mach_msg_header_t*>(&reply), | 808 reinterpret_cast<mach_msg_header_t*>(&reply), |
809 &destroy_complex_request)); | 809 &destroy_complex_request)); |
810 | 810 |
(...skipping 28 matching lines...) Expand all Loading... |
839 EXPECT_CALL( | 839 EXPECT_CALL( |
840 server, | 840 server, |
841 MockCatchMachException(kExceptionBehavior, | 841 MockCatchMachException(kExceptionBehavior, |
842 kServerLocalPort, | 842 kServerLocalPort, |
843 kExceptionThreadPort, | 843 kExceptionThreadPort, |
844 kExceptionTaskPort, | 844 kExceptionTaskPort, |
845 kExceptionType, | 845 kExceptionType, |
846 AreExceptionCodes(kTestMachExceptionCodes[0], | 846 AreExceptionCodes(kTestMachExceptionCodes[0], |
847 kTestMachExceptionCodes[1]), | 847 kTestMachExceptionCodes[1]), |
848 Pointee(Eq(kThreadStateFlavor)), | 848 Pointee(Eq(kThreadStateFlavor)), |
849 IsThreadStateCount(kThreadStateFlavorCount), | 849 IsThreadStateAndCount(kThreadStateFlavorCount), |
850 IsThreadStateCount(arraysize(reply.new_state)), | 850 IsThreadStateAndCount(arraysize(reply.new_state)), |
851 Eq(request.Trailer()))) | 851 Eq(request.Trailer()))) |
852 .WillOnce(Return(KERN_SUCCESS)) | 852 .WillOnce(Return(KERN_SUCCESS)) |
853 .RetiresOnSaturation(); | 853 .RetiresOnSaturation(); |
854 | 854 |
855 bool destroy_complex_request = false; | 855 bool destroy_complex_request = false; |
856 EXPECT_TRUE(universal_mach_exc_server.MachMessageServerFunction( | 856 EXPECT_TRUE(universal_mach_exc_server.MachMessageServerFunction( |
857 reinterpret_cast<mach_msg_header_t*>(&request), | 857 reinterpret_cast<mach_msg_header_t*>(&request), |
858 reinterpret_cast<mach_msg_header_t*>(&reply), | 858 reinterpret_cast<mach_msg_header_t*>(&reply), |
859 &destroy_complex_request)); | 859 &destroy_complex_request)); |
860 EXPECT_TRUE(destroy_complex_request); | 860 EXPECT_TRUE(destroy_complex_request); |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
969 | 969 |
970 virtual kern_return_t CatchMachException( | 970 virtual kern_return_t CatchMachException( |
971 exception_behavior_t behavior, | 971 exception_behavior_t behavior, |
972 exception_handler_t exception_port, | 972 exception_handler_t exception_port, |
973 thread_t thread, | 973 thread_t thread, |
974 task_t task, | 974 task_t task, |
975 exception_type_t exception, | 975 exception_type_t exception, |
976 const mach_exception_data_type_t* code, | 976 const mach_exception_data_type_t* code, |
977 mach_msg_type_number_t code_count, | 977 mach_msg_type_number_t code_count, |
978 thread_state_flavor_t* flavor, | 978 thread_state_flavor_t* flavor, |
979 const natural_t* old_state, | 979 ConstThreadState old_state, |
980 mach_msg_type_number_t old_state_count, | 980 mach_msg_type_number_t old_state_count, |
981 thread_state_t new_state, | 981 thread_state_t new_state, |
982 mach_msg_type_number_t* new_state_count, | 982 mach_msg_type_number_t* new_state_count, |
983 const mach_msg_trailer_t* trailer, | 983 const mach_msg_trailer_t* trailer, |
984 bool* destroy_complex_request) override { | 984 bool* destroy_complex_request) override { |
985 *destroy_complex_request = true; | 985 *destroy_complex_request = true; |
986 | 986 |
987 EXPECT_FALSE(handled_); | 987 EXPECT_FALSE(handled_); |
988 handled_ = true; | 988 handled_ = true; |
989 | 989 |
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1348 EXPECT_EQ(old_state[i], new_state[i]) << "i " << i; | 1348 EXPECT_EQ(old_state[i], new_state[i]) << "i " << i; |
1349 } | 1349 } |
1350 for (size_t i = arraysize(old_state); i < arraysize(new_state); ++i) { | 1350 for (size_t i = arraysize(old_state); i < arraysize(new_state); ++i) { |
1351 EXPECT_EQ(0u, new_state[i]) << "i " << i; | 1351 EXPECT_EQ(0u, new_state[i]) << "i " << i; |
1352 } | 1352 } |
1353 } | 1353 } |
1354 | 1354 |
1355 } // namespace | 1355 } // namespace |
1356 } // namespace test | 1356 } // namespace test |
1357 } // namespace crashpad | 1357 } // namespace crashpad |
OLD | NEW |