Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1389)

Unified Diff: content/browser/appcache/appcache_update_job_unittest.cc

Issue 2824583003: Remove URLRequestJob::GetResponseCode implementations from AppCache. (Closed)
Patch Set: Fix Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/appcache/appcache_update_job_unittest.cc
diff --git a/content/browser/appcache/appcache_update_job_unittest.cc b/content/browser/appcache/appcache_update_job_unittest.cc
index bff0c88ad5e7ff66a9194e8bbab2eea948d41bee..1ba9bbb6ea256b4383aa28c892c45d65a3494106 100644
--- a/content/browser/appcache/appcache_update_job_unittest.cc
+++ b/content/browser/appcache/appcache_update_job_unittest.cc
@@ -16,6 +16,7 @@
#include "base/memory/ptr_util.h"
#include "base/single_thread_task_runner.h"
#include "base/stl_util.h"
+#include "base/strings/stringprintf.h"
#include "base/synchronization/waitable_event.h"
#include "base/threading/thread.h"
#include "base/threading/thread_task_runner_handle.h"
@@ -25,6 +26,7 @@
#include "content/browser/appcache/mock_appcache_service.h"
#include "net/base/net_errors.h"
#include "net/http/http_response_headers.h"
+#include "net/http/http_util.h"
#include "net/url_request/url_request_error_job.h"
#include "net/url_request/url_request_job_factory_impl.h"
#include "net/url_request/url_request_test_job.h"
@@ -401,18 +403,14 @@ class RetryRequestTestJob : public net::URLRequestTestJob {
++num_requests_;
if (num_retries_ > 0 && request->original_url() == kRetryUrl) {
--num_retries_;
- return new RetryRequestTestJob(
- request, network_delegate, RetryRequestTestJob::retry_headers(), 503);
+ return new RetryRequestTestJob(request, network_delegate,
+ RetryRequestTestJob::retry_headers());
} else {
- return new RetryRequestTestJob(
- request,
- network_delegate,
- RetryRequestTestJob::manifest_headers(), 200);
+ return new RetryRequestTestJob(request, network_delegate,
+ RetryRequestTestJob::manifest_headers());
}
}
- int GetResponseCode() const override { return response_code_; }
-
private:
~RetryRequestTestJob() override {}
@@ -455,14 +453,12 @@ class RetryRequestTestJob : public net::URLRequestTestJob {
RetryRequestTestJob(net::URLRequest* request,
net::NetworkDelegate* network_delegate,
- const std::string& headers,
- int response_code)
- : net::URLRequestTestJob(
- request, network_delegate, headers, data(), true),
- response_code_(response_code) {
- }
-
- int response_code_;
+ const std::string& headers)
+ : net::URLRequestTestJob(request,
+ network_delegate,
+ headers,
+ data(),
+ true) {}
static int num_requests_;
static int num_retries_;
« no previous file with comments | « content/browser/appcache/appcache_request_handler_unittest.cc ('k') | content/browser/appcache/appcache_url_request_job.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698