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

Side by Side Diff: content/browser/fileapi/copy_or_move_operation_delegate_unittest.cc

Issue 2228403003: content: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 #include <map> 7 #include <map>
8 #include <queue> 8 #include <queue>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 directories.pop(); 322 directories.pop();
323 ASSERT_EQ(base::File::FILE_OK, ReadDirectory(dir, &entries)); 323 ASSERT_EQ(base::File::FILE_OK, ReadDirectory(dir, &entries));
324 for (size_t i = 0; i < entries.size(); ++i) { 324 for (size_t i = 0; i < entries.size(); ++i) {
325 FileSystemURL url = file_system_context_->CreateCrackedFileSystemURL( 325 FileSystemURL url = file_system_context_->CreateCrackedFileSystemURL(
326 dir.origin(), 326 dir.origin(),
327 dir.mount_type(), 327 dir.mount_type(),
328 dir.virtual_path().Append(entries[i].name)); 328 dir.virtual_path().Append(entries[i].name));
329 base::FilePath relative; 329 base::FilePath relative;
330 root.virtual_path().AppendRelativePath(url.virtual_path(), &relative); 330 root.virtual_path().AppendRelativePath(url.virtual_path(), &relative);
331 relative = relative.NormalizePathSeparators(); 331 relative = relative.NormalizePathSeparators();
332 ASSERT_TRUE(ContainsKey(test_case_map, relative)); 332 ASSERT_TRUE(base::ContainsKey(test_case_map, relative));
333 if (entries[i].is_directory) { 333 if (entries[i].is_directory) {
334 EXPECT_TRUE(test_case_map[relative]->is_directory); 334 EXPECT_TRUE(test_case_map[relative]->is_directory);
335 directories.push(url); 335 directories.push(url);
336 } else { 336 } else {
337 EXPECT_FALSE(test_case_map[relative]->is_directory); 337 EXPECT_FALSE(test_case_map[relative]->is_directory);
338 EXPECT_TRUE(FileExists(url, test_case_map[relative]->data_file_size)); 338 EXPECT_TRUE(FileExists(url, test_case_map[relative]->data_file_size));
339 } 339 }
340 test_case_map.erase(relative); 340 test_case_map.erase(relative);
341 } 341 }
342 } 342 }
(...skipping 525 matching lines...) Expand 10 before | Expand all | Expand 10 after
868 868
869 base::File::Error error = base::File::FILE_ERROR_FAILED; 869 base::File::Error error = base::File::FILE_ERROR_FAILED;
870 base::RunLoop run_loop; 870 base::RunLoop run_loop;
871 helper.Run(base::Bind(&AssignAndQuit, &run_loop, &error)); 871 helper.Run(base::Bind(&AssignAndQuit, &run_loop, &error));
872 run_loop.Run(); 872 run_loop.Run();
873 873
874 EXPECT_EQ(base::File::FILE_ERROR_ABORT, error); 874 EXPECT_EQ(base::File::FILE_ERROR_ABORT, error);
875 } 875 }
876 876
877 } // namespace content 877 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/file_descriptor_info_impl.cc ('k') | content/browser/frame_host/frame_tree_node_blame_context_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698