Index: ipc/ipc_channel_reader_unittest.cc |
diff --git a/ipc/ipc_channel_reader_unittest.cc b/ipc/ipc_channel_reader_unittest.cc |
index cbcd5dc5189cafa9a2410922e9b1216e72ada5bd..2ecc98b1874ba376e0f034a91eea208cfb07cbbc 100644 |
--- a/ipc/ipc_channel_reader_unittest.cc |
+++ b/ipc/ipc_channel_reader_unittest.cc |
@@ -6,6 +6,7 @@ |
#include <set> |
+#include "crypto/random.h" |
#include "ipc/attachment_broker.h" |
#include "ipc/brokerable_attachment.h" |
#include "ipc/ipc_channel_reader.h" |
@@ -17,9 +18,17 @@ namespace internal { |
namespace { |
+BrokerableAttachment::AttachmentId GenerateAttachementId() { |
+ BrokerableAttachment::AttachmentId result; |
+ crypto::RandBytes(result.nonce, BrokerableAttachment::kNonceSize); |
+ return result; |
+} |
+ |
class MockAttachment : public BrokerableAttachment { |
public: |
- MockAttachment(int internal_state) : internal_state_(internal_state) {} |
+ MockAttachment(int internal_state) |
+ : BrokerableAttachment(GenerateAttachementId(), true), |
+ internal_state_(internal_state) {} |
MockAttachment(BrokerableAttachment::AttachmentId id) |
: BrokerableAttachment(id, true), internal_state_(-1) {} |