Index: mock_http_fetcher.h |
diff --git a/mock_http_fetcher.h b/mock_http_fetcher.h |
index b46e0237aa6936a35e7b2b5fb43f6fe247849c37..6d72b9265e6c9f3ccfffce5f37e00a05e782937b 100644 |
--- a/mock_http_fetcher.h |
+++ b/mock_http_fetcher.h |
@@ -36,7 +36,8 @@ class MockHttpFetcher : public HttpFetcher { |
timeout_source_(NULL), |
timout_tag_(0), |
paused_(false), |
- fail_transfer_(false) { |
+ fail_transfer_(false), |
+ never_use_(false) { |
data_.insert(data_.end(), data, data + size); |
} |
@@ -66,6 +67,9 @@ class MockHttpFetcher : public HttpFetcher { |
// Fail the transfer. This simulates a network failure. |
void FailTransfer(int http_response_code); |
+ // If set to true, this will EXPECT fail on BeginTransfer |
+ void set_never_use(bool never_use) { never_use_ = never_use; } |
+ |
const std::vector<char>& post_data() const { |
return post_data_; |
} |
@@ -108,6 +112,9 @@ class MockHttpFetcher : public HttpFetcher { |
// Set to true if the transfer should fail. |
bool fail_transfer_; |
+ // Set to true if BeginTransfer should EXPECT fail. |
+ bool never_use_; |
+ |
DISALLOW_COPY_AND_ASSIGN(MockHttpFetcher); |
}; |