summaryrefslogtreecommitdiffstats
path: root/net/socket_stream
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-09 08:03:39 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-09 08:03:39 +0000
commit31a2bfeeba9a52f4dc651672aeeee9a66edae3b3 (patch)
tree6b76f6a7b0ad9b148f6587c0289032a94e2c3e6a /net/socket_stream
parent2a5ab280301194dd5594c9f76460b20a6755e499 (diff)
downloadchromium_src-31a2bfeeba9a52f4dc651672aeeee9a66edae3b3.zip
chromium_src-31a2bfeeba9a52f4dc651672aeeee9a66edae3b3.tar.gz
chromium_src-31a2bfeeba9a52f4dc651672aeeee9a66edae3b3.tar.bz2
Add bounds checking to StaticSocketDataProvider, to make tests more reliable
when they fail. TEST=net_unittests BUG=27567 Review URL: http://codereview.chromium.org/582020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38453 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/socket_stream')
-rw-r--r--net/socket_stream/socket_stream_unittest.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/net/socket_stream/socket_stream_unittest.cc b/net/socket_stream/socket_stream_unittest.cc
index 76d59e9..ae162a8 100644
--- a/net/socket_stream/socket_stream_unittest.cc
+++ b/net/socket_stream/socket_stream_unittest.cc
@@ -160,7 +160,8 @@ TEST_F(SocketStreamTest, BasicAuthProxy) {
MockRead("Proxy-Authenticate: Basic realm=\"MyRealm1\"\r\n"),
MockRead("\r\n"),
};
- StaticSocketDataProvider data1(data_reads1, data_writes1);
+ StaticSocketDataProvider data1(data_reads1, arraysize(data_reads1),
+ data_writes1, arraysize(data_writes1));
mock_socket_factory.AddSocketDataProvider(&data1);
MockWrite data_writes2[] = {
@@ -174,7 +175,8 @@ TEST_F(SocketStreamTest, BasicAuthProxy) {
MockRead("Proxy-agent: Apache/2.2.8\r\n"),
MockRead("\r\n"),
};
- StaticSocketDataProvider data2(data_reads2, data_writes2);
+ StaticSocketDataProvider data2(data_reads2, arraysize(data_reads2),
+ data_writes2, arraysize(data_writes2));
mock_socket_factory.AddSocketDataProvider(&data2);
TestCompletionCallback callback;