OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "ipc/ipc_sync_channel.h" | 5 #include "ipc/ipc_sync_channel.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 1499 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1510 events_[1]->Wait(); | 1510 events_[1]->Wait(); |
1511 DCHECK(received_msg_ == false); | 1511 DCHECK(received_msg_ == false); |
1512 | 1512 |
1513 Message* message = new SyncChannelTestMsg_NoArgs; | 1513 Message* message = new SyncChannelTestMsg_NoArgs; |
1514 message->set_unblock(true); | 1514 message->set_unblock(true); |
1515 Send(message); | 1515 Send(message); |
1516 received_noarg_reply_ = true; | 1516 received_noarg_reply_ = true; |
1517 PossiblyDone(); | 1517 PossiblyDone(); |
1518 } | 1518 } |
1519 | 1519 |
1520 base::Thread* ListenerThread() { return Worker::ListenerThread(); } | |
1521 private: | 1520 private: |
1522 virtual bool OnMessageReceived(const Message& message) OVERRIDE { | 1521 virtual bool OnMessageReceived(const Message& message) OVERRIDE { |
1523 IPC_BEGIN_MESSAGE_MAP(RestrictedDispatchDeadlockClient1, message) | 1522 IPC_BEGIN_MESSAGE_MAP(RestrictedDispatchDeadlockClient1, message) |
1524 IPC_MESSAGE_HANDLER(SyncChannelTestMsg_NoArgs, OnNoArgs) | 1523 IPC_MESSAGE_HANDLER(SyncChannelTestMsg_NoArgs, OnNoArgs) |
1525 IPC_END_MESSAGE_MAP() | 1524 IPC_END_MESSAGE_MAP() |
1526 return true; | 1525 return true; |
1527 } | 1526 } |
1528 | 1527 |
1529 void OnNoArgs() { | 1528 void OnNoArgs() { |
1530 received_msg_ = true; | 1529 received_msg_ = true; |
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1895 } | 1894 } |
1896 | 1895 |
1897 // Windows needs to send an out-of-band secret to verify the client end of the | 1896 // Windows needs to send an out-of-band secret to verify the client end of the |
1898 // channel. Test that we still connect correctly in that case. | 1897 // channel. Test that we still connect correctly in that case. |
1899 TEST_F(IPCSyncChannelTest, Verified) { | 1898 TEST_F(IPCSyncChannelTest, Verified) { |
1900 Verified(); | 1899 Verified(); |
1901 } | 1900 } |
1902 | 1901 |
1903 } // namespace | 1902 } // namespace |
1904 } // namespace IPC | 1903 } // namespace IPC |
OLD | NEW |