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

Unified Diff: jingle/notifier/base/fake_ssl_client_socket_unittest.cc

Issue 10796085: Give MockRead and MockWrite distinct types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix jingle tests. Created 8 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | net/http/http_network_transaction_spdy2_unittest.cc » ('j') | net/socket/socket_test_util.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: jingle/notifier/base/fake_ssl_client_socket_unittest.cc
diff --git a/jingle/notifier/base/fake_ssl_client_socket_unittest.cc b/jingle/notifier/base/fake_ssl_client_socket_unittest.cc
index 617e4d161b9117a8c515277a59a07079b3203236..4d6040bb800b8d5fddd319d4f4ac127ff326a4f7 100644
--- a/jingle/notifier/base/fake_ssl_client_socket_unittest.cc
+++ b/jingle/notifier/base/fake_ssl_client_socket_unittest.cc
@@ -72,16 +72,15 @@ class MockClientSocket : public net::StreamSocket {
// Break up |data| into a bunch of chunked MockReads/Writes and push
// them onto |ops|.
+template <net::MockReadWriteType type>
void AddChunkedOps(base::StringPiece data, size_t chunk_size, net::IoMode mode,
- std::vector<net::MockRead>* ops) {
+ std::vector<net::MockReadWrite<type> >* ops) {
DCHECK_GT(chunk_size, 0U);
size_t offset = 0;
while (offset < data.size()) {
size_t bounded_chunk_size = std::min(data.size() - offset, chunk_size);
- // We take advantage of the fact that MockWrite is typedefed to
- // MockRead.
- ops->push_back(net::MockRead(mode, data.data() + offset,
- bounded_chunk_size));
+ ops->push_back(net::MockReadWrite<type>(mode, data.data() + offset,
+ bounded_chunk_size));
offset += bounded_chunk_size;
}
}
« no previous file with comments | « no previous file | net/http/http_network_transaction_spdy2_unittest.cc » ('j') | net/socket/socket_test_util.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698