Helpful classes for testing. More...
#include "fetcher_test.h"
Public Member Functions | |
virtual bool | StreamingFetchUrl (const GoogleString &url, const RequestHeaders &request_headers, ResponseHeaders *response_headers, Writer *response_writer, MessageHandler *message_handler) |
int | num_fetches () const |
Helpful classes for testing.
This mock fetcher will only fetch kGoodUrl, returning kHtmlContent. If you ask for any other URL it will fail.
virtual bool net_instaweb::FetcherTest::MockFetcher::StreamingFetchUrl | ( | const GoogleString & | url, | |
const RequestHeaders & | request_headers, | |||
ResponseHeaders * | response_headers, | |||
Writer * | response_writer, | |||
MessageHandler * | message_handler | |||
) | [virtual] |
Fetch a URL, streaming the output to fetched_content_writer, and returning the headers. Returns true if the fetch was successful.
Implements net_instaweb::UrlFetcher.