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

Side by Side Diff: webkit/browser/fileapi/isolated_file_util_unittest.cc

Issue 19579005: Move ReadFileToString to the base namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <map> 5 #include <map>
6 #include <queue> 6 #include <queue>
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 AsyncFileTestHelper::GetPlatformPath( 177 AsyncFileTestHelper::GetPlatformPath(
178 file_system_context(), url2, &platform_path2)); 178 file_system_context(), url2, &platform_path2));
179 179
180 // See if file info matches with the other one. 180 // See if file info matches with the other one.
181 EXPECT_EQ(info1.is_directory, info2.is_directory); 181 EXPECT_EQ(info1.is_directory, info2.is_directory);
182 EXPECT_EQ(info1.size, info2.size); 182 EXPECT_EQ(info1.size, info2.size);
183 EXPECT_EQ(info1.is_symbolic_link, info2.is_symbolic_link); 183 EXPECT_EQ(info1.is_symbolic_link, info2.is_symbolic_link);
184 EXPECT_NE(platform_path1, platform_path2); 184 EXPECT_NE(platform_path1, platform_path2);
185 185
186 std::string content1, content2; 186 std::string content1, content2;
187 EXPECT_TRUE(file_util::ReadFileToString(platform_path1, &content1)); 187 EXPECT_TRUE(base::ReadFileToString(platform_path1, &content1));
188 EXPECT_TRUE(file_util::ReadFileToString(platform_path2, &content2)); 188 EXPECT_TRUE(base::ReadFileToString(platform_path2, &content2));
189 EXPECT_EQ(content1, content2); 189 EXPECT_EQ(content1, content2);
190 } 190 }
191 191
192 void VerifyDirectoriesHaveSameContent(const FileSystemURL& root1, 192 void VerifyDirectoriesHaveSameContent(const FileSystemURL& root1,
193 const FileSystemURL& root2) { 193 const FileSystemURL& root2) {
194 base::FilePath root_path1 = root1.path(); 194 base::FilePath root_path1 = root1.path();
195 base::FilePath root_path2 = root2.path(); 195 base::FilePath root_path2 = root2.path();
196 196
197 FileEntryList entries; 197 FileEntryList entries;
198 std::queue<FileSystemURL> directories; 198 std::queue<FileSystemURL> directories;
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after
538 EXPECT_EQ(base::PLATFORM_FILE_OK, 538 EXPECT_EQ(base::PLATFORM_FILE_OK,
539 file_util()->Truncate(GetOperationContext().get(), url, 999)); 539 file_util()->Truncate(GetOperationContext().get(), url, 999));
540 ASSERT_EQ(base::PLATFORM_FILE_OK, 540 ASSERT_EQ(base::PLATFORM_FILE_OK,
541 file_util()->GetFileInfo(GetOperationContext().get(), url, 541 file_util()->GetFileInfo(GetOperationContext().get(), url,
542 &info, &platform_path)); 542 &info, &platform_path));
543 EXPECT_EQ(999, info.size); 543 EXPECT_EQ(999, info.size);
544 } 544 }
545 } 545 }
546 546
547 } // namespace fileapi 547 } // namespace fileapi
OLDNEW
« no previous file with comments | « ui/gfx/icon_util_unittest.cc ('k') | webkit/browser/fileapi/local_file_stream_writer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698