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

Side by Side Diff: base/file_util_unittest.cc

Issue 2735009: Minor comment fix. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
399 TEST_F(FileUtilTest, GetDirectoryFromPath) { 399 TEST_F(FileUtilTest, GetDirectoryFromPath) {
400 for (unsigned int i = 0; i < arraysize(dir_cases); ++i) { 400 for (unsigned int i = 0; i < arraysize(dir_cases); ++i) {
401 const dir_case& dir = dir_cases[i]; 401 const dir_case& dir = dir_cases[i];
402 const std::wstring parent = 402 const std::wstring parent =
403 file_util::GetDirectoryFromPath(dir.full_path); 403 file_util::GetDirectoryFromPath(dir.full_path);
404 EXPECT_EQ(dir.directory, parent); 404 EXPECT_EQ(dir.directory, parent);
405 } 405 }
406 } 406 }
407 #endif 407 #endif
408 408
409 // Flaky, http://crbug.com/46246
409 TEST_F(FileUtilTest, FLAKY_CountFilesCreatedAfter) { 410 TEST_F(FileUtilTest, FLAKY_CountFilesCreatedAfter) {
410 // Create old file (that we don't want to count) 411 // Create old file (that we don't want to count)
411 FilePath old_file_name = test_dir_.Append(FILE_PATH_LITERAL("Old File.txt")); 412 FilePath old_file_name = test_dir_.Append(FILE_PATH_LITERAL("Old File.txt"));
412 CreateTextFile(old_file_name, L"Just call me Mr. Creakybits"); 413 CreateTextFile(old_file_name, L"Just call me Mr. Creakybits");
413 414
414 // Age to perfection 415 // Age to perfection
415 #if defined(OS_WIN) 416 #if defined(OS_WIN)
416 PlatformThread::Sleep(100); 417 PlatformThread::Sleep(100);
417 #elif defined(OS_POSIX) 418 #elif defined(OS_POSIX)
418 // We need to wait at least one second here because the precision of 419 // We need to wait at least one second here because the precision of
(...skipping 1422 matching lines...) Expand 10 before | Expand all | Expand 10 after
1841 EXPECT_TRUE(file_util::IsDirectoryEmpty(empty_dir)); 1842 EXPECT_TRUE(file_util::IsDirectoryEmpty(empty_dir));
1842 1843
1843 FilePath foo(empty_dir.Append(FILE_PATH_LITERAL("foo.txt"))); 1844 FilePath foo(empty_dir.Append(FILE_PATH_LITERAL("foo.txt")));
1844 std::string bar("baz"); 1845 std::string bar("baz");
1845 ASSERT_TRUE(file_util::WriteFile(foo, bar.c_str(), bar.length())); 1846 ASSERT_TRUE(file_util::WriteFile(foo, bar.c_str(), bar.length()));
1846 1847
1847 EXPECT_FALSE(file_util::IsDirectoryEmpty(empty_dir)); 1848 EXPECT_FALSE(file_util::IsDirectoryEmpty(empty_dir));
1848 } 1849 }
1849 1850
1850 } // namespace 1851 } // namespace
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698