Home | History | Annotate | Download | only in socket

Lines Matching refs:MockRead

41   // If the |result| member of a MockRead is
42 // ERR_TEST_PEER_CLOSE_AFTER_NEXT_MOCK_READ, that MockRead is just a
44 // MockRead. The other members of that MockRead are ignored.
62 struct MockRead {
69 MockRead() : async(false), result(0), data(NULL), data_len(0),
73 MockRead(bool async, int result) : async(async) , result(result), data(NULL),
77 MockRead(bool async, int result, int seq) : async(async) , result(result),
82 explicit MockRead(const char* data) : async(true), result(0), data(data),
87 MockRead(bool async, const char* data) : async(async), result(0), data(data),
92 MockRead(bool async, const char* data, int data_len) : async(async),
97 MockRead(bool async, int seq, const char* data) : async(async),
102 MockRead(bool async, const char* data, int data_len, int seq) : async(async),
119 // MockWrite uses the same member fields as MockRead, but with different
123 typedef MockRead MockWrite;
141 // If the |MockRead.result| is ERR_IO_PENDING, it informs the caller
144 virtual MockRead GetNextRead() = 0;
167 StaticSocketDataProvider(MockRead* reads, size_t reads_count,
172 const MockRead& PeekRead() const;
175 const MockRead& PeekRead(size_t index) const;
188 virtual MockRead GetNextRead();
193 MockRead* reads_;
218 virtual MockRead GetNextRead();
231 std::deque<MockRead> reads_;
263 // a MockRead to complete.
264 // |reads| the list of MockRead completions.
267 // Note: The MockRead and MockWrite lists musts end with a EOF
268 // e.g. a MockRead(true, 0, 0);
270 MockRead* reads, size_t reads_count,
274 // |reads| the list of MockRead completions.
276 // a MockRead to complete.
279 // Note: The MockRead and MockWrite lists musts end with a EOF
280 // e.g. a MockRead(true, 0, 0);
282 MockRead* reads, size_t reads_count,
289 virtual MockRead GetNextRead();
301 // ERR_IO_PENDING (that way we don't have to explicitly add a MockRead just to
305 // number in the MockRead's sequence number. When that MockRead is reached,
313 // |reads| the list of MockRead completions.
316 // Note: The MockRead and MockWrite lists musts end with a EOF
317 // e.g. a MockRead(true, 0, 0);
318 OrderedSocketData(MockRead* reads, size_t reads_count,
322 // |reads| the list of MockRead completions.
325 // Note: The MockRead and MockWrite lists musts end with a EOF
326 // e.g. a MockRead(true, 0, 0);
328 MockRead* reads, size_t reads_count,
339 virtual MockRead GetNextRead();
367 // when the corresponding MockRead or MockWrite is marked !async).
389 // MockRead reads[] = {
390 // MockRead(false, "first read", length, 0) // sync
391 // MockRead(true, "second read", length, 2) // async
417 // |reads| the list of MockRead completions.
419 DeterministicSocketData(MockRead* reads, size_t reads_count,
436 MockRead& current_read() { return current_read_; }
437 MockRead& current_write() { return current_write_; }
447 virtual MockRead GetNextRead();
463 MockRead current_read_;
567 virtual void OnReadComplete(const MockRead& data) = 0;
630 virtual void OnReadComplete(const MockRead& data);
639 net::MockRead read_data_;
682 virtual void OnReadComplete(const MockRead& data);
689 net::MockRead read_data_;
731 virtual void OnReadComplete(const MockRead& data);