|
[sync] Allow FakeURLFetcher to return arbitrary HTTP response codes
As of today, FakeURLFetcher takes a boolean "success" parameter, and
returns one of two HTTP response codes: 200 for success and 500 for
failure.
In order to write sync tests for auth errors, we need to be able to fake
arbitrary HTTP response codes.
This patch modifies FakeURLFetcher to return arbitrary HTTP response
codes and fixes all existing call sites. Tests that return arbitrary
error codes will be added in a separate CL.
R=achuith@chromium.org, ajwong@chromium.org, akalin@chromium.org, bengr@chromium.org, nyquist@chromium.org, sergeyu@chromium.org, vitalybuka@chromium.org
TBR=battre, mattm, sky, stevenjb, tim
BUG= 313905
TEST=All existing tests pass trybots and waterfall
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=232724
Total comments: 14
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+252 lines, -176 lines) |
Patch |
 |
M |
chrome/browser/chromeos/login/eula_browsertest.cc
|
View
|
|
4 chunks |
+5 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/chromeos/policy/cloud_external_data_manager_base_unittest.cc
|
View
|
1
2
|
12 chunks |
+18 lines, -14 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/local_discovery/cloud_print_printer_list_unittest.cc
|
View
|
|
2 chunks |
+2 lines, -1 line |
0 comments
|
Download
|
 |
M |
chrome/browser/net/spdyproxy/data_reduction_proxy_settings_unittest.cc
|
View
|
1
|
2 chunks |
+6 lines, -4 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/notifications/sync_notifier/notification_bitmap_fetcher_browsertest.cc
|
View
|
|
4 chunks |
+6 lines, -3 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/profile_resetter/profile_resetter_unittest.cc
|
View
|
1
|
5 chunks |
+9 lines, -5 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/safe_browsing/client_side_detection_service_unittest.cc
|
View
|
1
2
|
21 chunks |
+38 lines, -33 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/safe_browsing/download_protection_service_unittest.cc
|
View
|
1
2
3
4
|
12 chunks |
+14 lines, -11 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/signin/signin_browsertest.cc
|
View
|
|
2 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/sync/test/integration/sync_test.cc
|
View
|
|
3 chunks |
+8 lines, -7 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/search/instant_extended_interactive_uitest.cc
|
View
|
|
3 chunks |
+3 lines, -2 lines |
0 comments
|
Download
|
 |
M |
chrome/browser/ui/webui/local_discovery/local_discovery_ui_browsertest.cc
|
View
|
|
4 chunks |
+12 lines, -11 lines |
0 comments
|
Download
|
 |
M |
chrome/service/cloud_print/printer_job_handler_unittest.cc
|
View
|
1
2
|
9 chunks |
+32 lines, -26 lines |
0 comments
|
Download
|
 |
M |
components/dom_distiller/core/distiller_url_fetcher_unittest.cc
|
View
|
|
2 chunks |
+5 lines, -2 lines |
0 comments
|
Download
|
 |
M |
components/precache/core/precache_fetcher_unittest.cc
|
View
|
|
8 chunks |
+30 lines, -16 lines |
0 comments
|
Download
|
 |
M |
net/url_request/test_url_fetcher_factory.h
|
View
|
1
2
3
|
7 chunks |
+37 lines, -22 lines |
0 comments
|
Download
|
 |
M |
net/url_request/test_url_fetcher_factory.cc
|
View
|
1
2
|
3 chunks |
+13 lines, -9 lines |
0 comments
|
Download
|
 |
M |
remoting/host/token_validator_factory_impl_unittest.cc
|
View
|
|
5 chunks |
+9 lines, -4 lines |
0 comments
|
Download
|
Total messages: 16 (0 generated)
|