| Index: content/child/web_url_loader_impl_unittest.cc
|
| diff --git a/content/child/web_url_loader_impl_unittest.cc b/content/child/web_url_loader_impl_unittest.cc
|
| index 7a48565e315a99ad313fcb7fa33469c099d0e2cd..d04eac9db33ec8ca5c72be914e8b611083c407af 100644
|
| --- a/content/child/web_url_loader_impl_unittest.cc
|
| +++ b/content/child/web_url_loader_impl_unittest.cc
|
| @@ -5,6 +5,7 @@
|
| #include "content/child/web_url_loader_impl.h"
|
|
|
| #include <string.h>
|
| +#include <vector>
|
|
|
| #include "base/command_line.h"
|
| #include "base/macros.h"
|
| @@ -33,6 +34,8 @@
|
| namespace content {
|
| namespace {
|
|
|
| +using FixedReceivedData = RequestPeer::FixedReceivedData;
|
| +
|
| const char kTestURL[] = "http://foo";
|
| const char kTestData[] = "blah!";
|
|
|
| @@ -285,7 +288,8 @@ class WebURLLoaderImplTest : public testing::Test {
|
| // Assumes it is called only once for a request.
|
| void DoReceiveData() {
|
| EXPECT_EQ("", client()->received_data());
|
| - peer()->OnReceivedData(kTestData, strlen(kTestData), strlen(kTestData));
|
| + peer()->OnReceivedData(make_scoped_ptr(new FixedReceivedData(
|
| + kTestData, strlen(kTestData), strlen(kTestData))));
|
| EXPECT_EQ(kTestData, client()->received_data());
|
| }
|
|
|
| @@ -317,8 +321,8 @@ class WebURLLoaderImplTest : public testing::Test {
|
| }
|
|
|
| void DoReceiveDataFtp() {
|
| - peer()->OnReceivedData(kFtpDirListing, strlen(kFtpDirListing),
|
| - strlen(kFtpDirListing));
|
| + peer()->OnReceivedData(make_scoped_ptr(new FixedReceivedData(
|
| + kFtpDirListing, strlen(kFtpDirListing), strlen(kFtpDirListing))));
|
| // The FTP delegate should modify the data the client sees.
|
| EXPECT_NE(kFtpDirListing, client()->received_data());
|
| }
|
| @@ -335,8 +339,9 @@ class WebURLLoaderImplTest : public testing::Test {
|
| }
|
|
|
| void DoReceiveDataMultipart() {
|
| - peer()->OnReceivedData(kMultipartResponse, strlen(kMultipartResponse),
|
| - strlen(kMultipartResponse));
|
| + peer()->OnReceivedData(make_scoped_ptr(
|
| + new FixedReceivedData(kMultipartResponse, strlen(kMultipartResponse),
|
| + strlen(kMultipartResponse))));
|
| // Multipart delegate should modify the data the client sees.
|
| EXPECT_NE(kMultipartResponse, client()->received_data());
|
| }
|
|
|