| Index: content/test/weburl_loader_mock_factory.cc
|
| diff --git a/content/test/weburl_loader_mock_factory.cc b/content/test/weburl_loader_mock_factory.cc
|
| index 64bdea1b8824afe31a2e7a9dd135247dd2b66ade..1651800902696f39314a2dbd40b1782dc5a445a7 100644
|
| --- a/content/test/weburl_loader_mock_factory.cc
|
| +++ b/content/test/weburl_loader_mock_factory.cc
|
| @@ -108,9 +108,7 @@ bool WebURLLoaderMockFactory::IsMockedURL(const blink::WebURL& url) {
|
| }
|
|
|
| void WebURLLoaderMockFactory::CancelLoad(WebURLLoaderMock* loader) {
|
| - LoaderToRequestMap::iterator iter = pending_loaders_.find(loader);
|
| - DCHECK(iter != pending_loaders_.end());
|
| - pending_loaders_.erase(iter);
|
| + pending_loaders_.erase(loader);
|
| }
|
|
|
| WebURLLoader* WebURLLoaderMockFactory::CreateURLLoader(
|
| @@ -166,6 +164,11 @@ bool WebURLLoaderMockFactory::IsPending(WebURLLoaderMock* loader) {
|
| // static
|
| bool WebURLLoaderMockFactory::ReadFile(const base::FilePath& file_path,
|
| WebData* data) {
|
| + // If the path is empty then we return an empty file so tests can simulate
|
| + // requests without needing to actually load files.
|
| + if (file_path.empty())
|
| + return true;
|
| +
|
| int64 file_size = 0;
|
| if (!base::GetFileSize(file_path, &file_size))
|
| return false;
|
|
|