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

Unified Diff: base/files/file_util_proxy_unittest.cc

Issue 157593005: Added new ReadFileToString API with a max_size argument (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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
« base/file_util.cc ('K') | « base/file_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/files/file_util_proxy_unittest.cc
diff --git a/base/files/file_util_proxy_unittest.cc b/base/files/file_util_proxy_unittest.cc
index 30c77d39884c3ce82004bc78e6a9871f62f08936..0e449884db24abf6d9c37cf17a134b8721348f52 100644
--- a/base/files/file_util_proxy_unittest.cc
+++ b/base/files/file_util_proxy_unittest.cc
@@ -217,6 +217,12 @@ TEST_F(FileUtilProxyTest, CreateTemporary) {
EXPECT_TRUE(ReadFileToString(path_, &data));
EXPECT_EQ("test", data);
+ EXPECT_FALSE(ReadFileToString(path_, &data, 0));
Andrew T Wilson (Slow) 2014/02/10 14:29:46 Can we move these to a separate test? Also, can y
kaliamoorthi 2014/02/11 10:10:45 Done.
+ EXPECT_FALSE(ReadFileToString(path_, &data, 2));
bartfab (slow) 2014/02/10 14:55:37 Nit: Could you order these tests by increasing max
kaliamoorthi 2014/02/11 10:10:45 Done.
+ EXPECT_TRUE(ReadFileToString(path_, &data, 6));
+ EXPECT_FALSE(ReadFileToString(path_, &data, 3));
+ EXPECT_TRUE(ReadFileToString(path_, &data, 4));
+
// Make sure we can & do delete the created file to prevent leaks on the bots.
EXPECT_TRUE(base::DeleteFile(path_, false));
}
« base/file_util.cc ('K') | « base/file_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698