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

Unified Diff: net/websockets/websocket_unittest.cc

Issue 582020: Add bounds checking to StaticSocketDataProvider, to make tests more reliable (Closed)
Patch Set: Created 10 years, 10 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/spdy/spdy_network_transaction_unittest.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_unittest.cc
diff --git a/net/websockets/websocket_unittest.cc b/net/websockets/websocket_unittest.cc
index e3c5725b1bc13e5b72c3812db9ea6d9d761c7242..7ed42f93e2f5451534d6c037d699bb09f7cfd1b2 100644
--- a/net/websockets/websocket_unittest.cc
+++ b/net/websockets/websocket_unittest.cc
@@ -148,7 +148,8 @@ TEST_F(WebSocketTest, Connect) {
"WebSocket-Protocol: sample\r\n"
"\r\n"),
};
- StaticSocketDataProvider data(data_reads, data_writes);
+ StaticSocketDataProvider data(data_reads, arraysize(data_reads),
+ data_writes, arraysize(data_writes));
mock_socket_factory.AddSocketDataProvider(&data);
WebSocket::Request* request(
@@ -208,7 +209,8 @@ TEST_F(WebSocketTest, ServerSentData) {
"WebSocket-Protocol: sample\r\n"
"\r\n"),
};
- StaticSocketDataProvider data(data_reads, data_writes);
+ StaticSocketDataProvider data(data_reads, arraysize(data_reads),
+ data_writes, arraysize(data_writes));
mock_socket_factory.AddSocketDataProvider(&data);
WebSocket::Request* request(
« no previous file with comments | « net/spdy/spdy_network_transaction_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698