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

Side by Side Diff: util/win/exception_handler_server_test.cc

Issue 1356383002: win: Implement CRASHPAD_SIMULATE_CRASH() (Closed) Base URL: https://chromium.googlesource.com/crashpad/crashpad@master
Patch Set: . 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
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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 }; 55 };
56 56
57 class TestDelegate : public ExceptionHandlerServer::Delegate { 57 class TestDelegate : public ExceptionHandlerServer::Delegate {
58 public: 58 public:
59 explicit TestDelegate(HANDLE server_ready) : server_ready_(server_ready) {} 59 explicit TestDelegate(HANDLE server_ready) : server_ready_(server_ready) {}
60 ~TestDelegate() override {} 60 ~TestDelegate() override {}
61 61
62 void ExceptionHandlerServerStarted() override { 62 void ExceptionHandlerServerStarted() override {
63 SetEvent(server_ready_); 63 SetEvent(server_ready_);
64 } 64 }
65 unsigned int ExceptionHandlerServerException( 65 void ExceptionHandlerServerException(
66 HANDLE process, 66 HANDLE process,
67 WinVMAddress exception_information_address) override { 67 WinVMAddress exception_information_address) override {}
68 return 0;
69 }
70 68
71 void WaitForStart() { WaitForSingleObject(server_ready_, INFINITE); } 69 void WaitForStart() { WaitForSingleObject(server_ready_, INFINITE); }
72 70
73 private: 71 private:
74 HANDLE server_ready_; // weak 72 HANDLE server_ready_; // weak
75 bool started_; 73 bool started_;
76 74
77 DISALLOW_COPY_AND_ASSIGN(TestDelegate); 75 DISALLOW_COPY_AND_ASSIGN(TestDelegate);
78 }; 76 };
79 77
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 198
201 ASSERT_EQ("OK", ReadString(handles_3->read.get())); 199 ASSERT_EQ("OK", ReadString(handles_3->read.get()));
202 ASSERT_EQ("OK", ReadString(handles_2->read.get())); 200 ASSERT_EQ("OK", ReadString(handles_2->read.get()));
203 ASSERT_EQ("OK", ReadString(handles_1->read.get())); 201 ASSERT_EQ("OK", ReadString(handles_1->read.get()));
204 } 202 }
205 } 203 }
206 204
207 } // namespace 205 } // namespace
208 } // namespace test 206 } // namespace test
209 } // namespace crashpad 207 } // namespace crashpad
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698