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

Unified Diff: net/http/http_transaction_unittest.cc

Issue 12310075: Cache failover to LOAD_PREFERRING_CACHE if network response suggests offline. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed vestigial reference to new content flag. Created 7 years, 10 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: net/http/http_transaction_unittest.cc
diff --git a/net/http/http_transaction_unittest.cc b/net/http/http_transaction_unittest.cc
index 9eca8c67bef4e24191e15b5d06040b0b8143e15a..ce73d752d354b1c5db165f7e079c95c1130385e9 100644
--- a/net/http/http_transaction_unittest.cc
+++ b/net/http/http_transaction_unittest.cc
@@ -38,7 +38,8 @@ const MockTransaction kSimpleGET_Transaction = {
"<html><body>Google Blah Blah</body></html>",
TEST_MODE_NORMAL,
NULL,
- 0
+ 0,
+ net::OK
};
const MockTransaction kSimplePOST_Transaction = {
@@ -53,7 +54,8 @@ const MockTransaction kSimplePOST_Transaction = {
"<html><body>Google Blah Blah</body></html>",
TEST_MODE_NORMAL,
NULL,
- 0
+ 0,
+ net::OK
};
const MockTransaction kTypicalGET_Transaction = {
@@ -69,7 +71,8 @@ const MockTransaction kTypicalGET_Transaction = {
"<html><body>Google Blah Blah</body></html>",
TEST_MODE_NORMAL,
NULL,
- 0
+ 0,
+ net::OK
};
const MockTransaction kETagGET_Transaction = {
@@ -85,7 +88,8 @@ const MockTransaction kETagGET_Transaction = {
"<html><body>Google Blah Blah</body></html>",
TEST_MODE_NORMAL,
NULL,
- 0
+ 0,
+ net::OK
};
const MockTransaction kRangeGET_Transaction = {
@@ -100,7 +104,8 @@ const MockTransaction kRangeGET_Transaction = {
"<html><body>Google Blah Blah</body></html>",
TEST_MODE_NORMAL,
NULL,
- 0
+ 0,
+ net::OK
};
static const MockTransaction* const kBuiltinMockTransactions[] = {
@@ -257,9 +262,9 @@ int MockNetworkTransaction::Start(const net::HttpRequestInfo* request,
test_mode_ = t->test_mode;
if (test_mode_ & TEST_MODE_SYNC_NET_START)
- return net::OK;
+ return t->error_return;
- CallbackLater(callback, net::OK);
+ CallbackLater(callback, t->error_return);
return net::ERR_IO_PENDING;
}
« net/http/http_transaction_unittest.h ('K') | « net/http/http_transaction_unittest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698