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

Side by Side Diff: base/file_util_unittest.cc

Issue 3143037: Spelling correction: "nonexistant" -> "nonexistent". (Closed)
Patch Set: nitty Created 10 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
« no previous file with comments | « app/sql/transaction.cc ('k') | chrome/browser/cancelable_request.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 "build/build_config.h" 5 #include "build/build_config.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <winioctl.h> 9 #include <winioctl.h>
10 #include <shellapi.h> 10 #include <shellapi.h>
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 // we know it is not a link. 421 // we know it is not a link.
422 FilePath file_a_path = test_dir_.Append(FPL("file_a")); 422 FilePath file_a_path = test_dir_.Append(FPL("file_a"));
423 FilePath dir_path = test_dir_.Append(FPL("dir")); 423 FilePath dir_path = test_dir_.Append(FPL("dir"));
424 FilePath file_b_path = dir_path.Append(FPL("file_b")); 424 FilePath file_b_path = dir_path.Append(FPL("file_b"));
425 file_util::CreateDirectory(dir_path); 425 file_util::CreateDirectory(dir_path);
426 426
427 FilePath normalized_file_a_path, normalized_file_b_path; 427 FilePath normalized_file_a_path, normalized_file_b_path;
428 ASSERT_FALSE(file_util::PathExists(file_a_path)); 428 ASSERT_FALSE(file_util::PathExists(file_a_path));
429 ASSERT_FALSE(file_util::NormalizeFilePath(file_a_path, 429 ASSERT_FALSE(file_util::NormalizeFilePath(file_a_path,
430 &normalized_file_a_path)) 430 &normalized_file_a_path))
431 << "NormalizeFilePath() should fail on nonexistant paths."; 431 << "NormalizeFilePath() should fail on nonexistent paths.";
432 432
433 CreateTextFile(file_a_path, bogus_content); 433 CreateTextFile(file_a_path, bogus_content);
434 ASSERT_TRUE(file_util::PathExists(file_a_path)); 434 ASSERT_TRUE(file_util::PathExists(file_a_path));
435 ASSERT_TRUE(file_util::NormalizeFilePath(file_a_path, 435 ASSERT_TRUE(file_util::NormalizeFilePath(file_a_path,
436 &normalized_file_a_path)); 436 &normalized_file_a_path));
437 437
438 CreateTextFile(file_b_path, bogus_content); 438 CreateTextFile(file_b_path, bogus_content);
439 ASSERT_TRUE(file_util::PathExists(file_b_path)); 439 ASSERT_TRUE(file_util::PathExists(file_b_path));
440 ASSERT_TRUE(file_util::NormalizeFilePath(file_b_path, 440 ASSERT_TRUE(file_util::NormalizeFilePath(file_b_path,
441 &normalized_file_b_path)); 441 &normalized_file_b_path));
(...skipping 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after
1793 EXPECT_TRUE(file_util::IsDirectoryEmpty(empty_dir)); 1793 EXPECT_TRUE(file_util::IsDirectoryEmpty(empty_dir));
1794 1794
1795 FilePath foo(empty_dir.Append(FILE_PATH_LITERAL("foo.txt"))); 1795 FilePath foo(empty_dir.Append(FILE_PATH_LITERAL("foo.txt")));
1796 std::string bar("baz"); 1796 std::string bar("baz");
1797 ASSERT_TRUE(file_util::WriteFile(foo, bar.c_str(), bar.length())); 1797 ASSERT_TRUE(file_util::WriteFile(foo, bar.c_str(), bar.length()));
1798 1798
1799 EXPECT_FALSE(file_util::IsDirectoryEmpty(empty_dir)); 1799 EXPECT_FALSE(file_util::IsDirectoryEmpty(empty_dir));
1800 } 1800 }
1801 1801
1802 } // namespace 1802 } // namespace
OLDNEW
« no previous file with comments | « app/sql/transaction.cc ('k') | chrome/browser/cancelable_request.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698