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

Unified Diff: net/websockets/websocket_test_util.cc

Issue 143913003: Add construction of WebSocketDeflateStream (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase and add DCHECK() for extension params. Created 6 years, 11 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 | « net/websockets/websocket_stream_test.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/websockets/websocket_test_util.cc
diff --git a/net/websockets/websocket_test_util.cc b/net/websockets/websocket_test_util.cc
index 55113c6f15c779c2a6e5c1178f9261485477c85f..da030c529486fbec12bf0f70a302969365bd92d9 100644
--- a/net/websockets/websocket_test_util.cc
+++ b/net/websockets/websocket_test_util.cc
@@ -44,6 +44,7 @@ std::string WebSocketStandardRequest(const std::string& path,
"Accept-Encoding: gzip,deflate\r\n"
"Accept-Language: en-us,fr\r\n"
"Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==\r\n"
+ "Sec-WebSocket-Extensions: permessage-deflate; client_max_window_bits\r\n"
"%s\r\n",
path.c_str(),
origin.c_str(),
@@ -87,8 +88,14 @@ void WebSocketDeterministicMockClientSocketFactoryMaker::SetExpectations(
// We need to extend the lifetime of these strings.
detail_->expect_written = expect_written;
detail_->return_to_read = return_to_read;
- detail_->write = MockWrite(SYNCHRONOUS, 0, detail_->expect_written.c_str());
- detail_->read = MockRead(SYNCHRONOUS, 1, detail_->return_to_read.c_str());
+ detail_->write = MockWrite(SYNCHRONOUS,
+ detail_->expect_written.data(),
+ detail_->expect_written.size(),
+ 0);
+ detail_->read = MockRead(SYNCHRONOUS,
+ detail_->return_to_read.data(),
+ detail_->return_to_read.size(),
+ 1);
scoped_ptr<DeterministicSocketData> socket_data(
new DeterministicSocketData(&detail_->read, 1, &detail_->write, 1));
socket_data->set_connect_data(MockConnect(SYNCHRONOUS, OK));
« no previous file with comments | « net/websockets/websocket_stream_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698