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

Unified Diff: net/http/http_network_transaction_unittest.cc

Issue 2030353002: UploadDataStream now returns errors on failures (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Matt's comments, rebasing + fixed unittests Created 4 years, 6 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
« net/base/elements_upload_data_stream.cc ('K') | « net/base/upload_data_stream.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction_unittest.cc
diff --git a/net/http/http_network_transaction_unittest.cc b/net/http/http_network_transaction_unittest.cc
index 342e170cab3d2159015a9e3fb0e5a601999e0e5d..a82698f7e2d80e853bcfda9c0cae08074b3d771a 100644
--- a/net/http/http_network_transaction_unittest.cc
+++ b/net/http/http_network_transaction_unittest.cc
@@ -9684,18 +9684,17 @@ TEST_P(HttpNetworkTransactionTest, UploadFileSmallerThanLength) {
EXPECT_EQ(ERR_IO_PENDING, rv);
rv = callback.WaitForResult();
- EXPECT_EQ(OK, rv);
+ EXPECT_EQ(ERR_UPLOAD_FILE_CHANGED, rv);
const HttpResponseInfo* response = trans->GetResponseInfo();
ASSERT_TRUE(response);
- EXPECT_TRUE(response->headers);
- EXPECT_EQ("HTTP/1.0 200 OK", response->headers->GetStatusLine());
+ EXPECT_FALSE(response->headers);
mmenke 2016/06/21 21:13:14 Should remove code below this line (Code shouldn't
maksims (do not use this acc) 2016/06/22 15:10:32 Done.
std::string response_data;
rv = ReadTransaction(trans.get(), &response_data);
EXPECT_EQ(OK, rv);
- EXPECT_EQ("hello world", response_data);
+ EXPECT_EQ("HTTP/1.0 200 OK\r\n\r\nhello world", response_data);
base::DeleteFile(temp_file_path, false);
}
« net/base/elements_upload_data_stream.cc ('K') | « net/base/upload_data_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698