OLD | NEW |
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 "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 <shellapi.h> | 9 #include <shellapi.h> |
10 #include <shlobj.h> | 10 #include <shlobj.h> |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
333 {L"/foo/bar//", L"/foo/bar"}, | 333 {L"/foo/bar//", L"/foo/bar"}, |
334 {L"/foo/bar", L"/foo"}, | 334 {L"/foo/bar", L"/foo"}, |
335 {L"/foo/bar./", L"/foo/bar."}, | 335 {L"/foo/bar./", L"/foo/bar."}, |
336 {L"/", L"/"}, | 336 {L"/", L"/"}, |
337 {L".", L"."}, | 337 {L".", L"."}, |
338 {L"..", L"."}, // yes, ".." technically lives in "." | 338 {L"..", L"."}, // yes, ".." technically lives in "." |
339 #endif | 339 #endif |
340 }; | 340 }; |
341 | 341 |
342 // Flaky, http://crbug.com/46246 | 342 // Flaky, http://crbug.com/46246 |
343 TEST_F(FileUtilTest, FLAKY_CountFilesCreatedAfter) { | 343 TEST_F(FileUtilTest, DISABLED_CountFilesCreatedAfter) { |
344 // Create old file (that we don't want to count) | 344 // Create old file (that we don't want to count) |
345 FilePath old_file_name = | 345 FilePath old_file_name = |
346 temp_dir_.path().Append(FILE_PATH_LITERAL("Old File.txt")); | 346 temp_dir_.path().Append(FILE_PATH_LITERAL("Old File.txt")); |
347 CreateTextFile(old_file_name, L"Just call me Mr. Creakybits"); | 347 CreateTextFile(old_file_name, L"Just call me Mr. Creakybits"); |
348 | 348 |
349 // Age to perfection | 349 // Age to perfection |
350 #if defined(OS_WIN) | 350 #if defined(OS_WIN) |
351 base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(100)); | 351 base::PlatformThread::Sleep(base::TimeDelta::FromMilliseconds(100)); |
352 #elif defined(OS_POSIX) | 352 #elif defined(OS_POSIX) |
353 // We need to wait at least one second here because the precision of | 353 // We need to wait at least one second here because the precision of |
(...skipping 1932 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2286 file_util::VerifyPathControlledByUser( | 2286 file_util::VerifyPathControlledByUser( |
2287 base_dir_, text_file_, uid_, ok_gids_)); | 2287 base_dir_, text_file_, uid_, ok_gids_)); |
2288 EXPECT_TRUE( | 2288 EXPECT_TRUE( |
2289 file_util::VerifyPathControlledByUser( | 2289 file_util::VerifyPathControlledByUser( |
2290 sub_dir_, text_file_, uid_, ok_gids_)); | 2290 sub_dir_, text_file_, uid_, ok_gids_)); |
2291 } | 2291 } |
2292 | 2292 |
2293 #endif // defined(OS_POSIX) | 2293 #endif // defined(OS_POSIX) |
2294 | 2294 |
2295 } // namespace | 2295 } // namespace |
OLD | NEW |