| 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 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 76 DISALLOW_COPY_AND_ASSIGN(TestDelegate); | 76 DISALLOW_COPY_AND_ASSIGN(TestDelegate); |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 class ExceptionHandlerServerTest : public testing::Test { | 79 class ExceptionHandlerServerTest : public testing::Test { |
| 80 public: | 80 public: |
| 81 ExceptionHandlerServerTest() | 81 ExceptionHandlerServerTest() |
| 82 : pipe_name_("\\\\.\\pipe\\exception_handler_server_test_pipe_" + | 82 : pipe_name_("\\\\.\\pipe\\exception_handler_server_test_pipe_" + |
| 83 base::StringPrintf("%08x", GetCurrentProcessId())), | 83 base::StringPrintf("%08x", GetCurrentProcessId())), |
| 84 server_ready_(CreateEvent(nullptr, false, false, nullptr)), | 84 server_ready_(CreateEvent(nullptr, false, false, nullptr)), |
| 85 delegate_(server_ready_.get()), | 85 delegate_(server_ready_.get()), |
| 86 server_(pipe_name_), | 86 server_(pipe_name_, true), |
| 87 server_thread_(&server_, &delegate_) {} | 87 server_thread_(&server_, &delegate_) {} |
| 88 | 88 |
| 89 TestDelegate& delegate() { return delegate_; } | 89 TestDelegate& delegate() { return delegate_; } |
| 90 ExceptionHandlerServer& server() { return server_; } | 90 ExceptionHandlerServer& server() { return server_; } |
| 91 Thread& server_thread() { return server_thread_; } | 91 Thread& server_thread() { return server_thread_; } |
| 92 const std::string& pipe_name() const { return pipe_name_; } | 92 const std::string& pipe_name() const { return pipe_name_; } |
| 93 | 93 |
| 94 private: | 94 private: |
| 95 std::string pipe_name_; | 95 std::string pipe_name_; |
| 96 ScopedKernelHANDLE server_ready_; | 96 ScopedKernelHANDLE server_ready_; |
| (...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 199 |
| 200 ASSERT_EQ("OK", ReadString(handles_3->read.get())); | 200 ASSERT_EQ("OK", ReadString(handles_3->read.get())); |
| 201 ASSERT_EQ("OK", ReadString(handles_2->read.get())); | 201 ASSERT_EQ("OK", ReadString(handles_2->read.get())); |
| 202 ASSERT_EQ("OK", ReadString(handles_1->read.get())); | 202 ASSERT_EQ("OK", ReadString(handles_1->read.get())); |
| 203 } | 203 } |
| 204 } | 204 } |
| 205 | 205 |
| 206 } // namespace | 206 } // namespace |
| 207 } // namespace test | 207 } // namespace test |
| 208 } // namespace crashpad | 208 } // namespace crashpad |
| OLD | NEW |