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

Side by Side Diff: chrome/browser/download/download_path_reservation_tracker_unittest.cc

Issue 12829005: Fix OS_MACOS typos. Should be OS_MACOSX. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/files/file_path.h" 6 #include "base/files/file_path.h"
7 #include "base/files/scoped_temp_dir.h" 7 #include "base/files/scoped_temp_dir.h"
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 435 matching lines...) Expand 10 before | Expand all | Expand 10 after
446 EXPECT_TRUE(IsPathInUse(new_target_path)); 446 EXPECT_TRUE(IsPathInUse(new_target_path));
447 447
448 // Destroying the item should release the reservation. 448 // Destroying the item should release the reservation.
449 item.reset(); 449 item.reset();
450 message_loop_.RunUntilIdle(); 450 message_loop_.RunUntilIdle();
451 EXPECT_FALSE(IsPathInUse(new_target_path)); 451 EXPECT_FALSE(IsPathInUse(new_target_path));
452 } 452 }
453 453
454 // Tests for long name truncation. On other platforms automatic truncation 454 // Tests for long name truncation. On other platforms automatic truncation
455 // is not performed (yet). 455 // is not performed (yet).
456 #if defined(OS_WIN) || defined(OS_MAC) || defined(OS_CHROMEOS) 456 #if defined(OS_WIN) || defined(OS_MACOSX) || defined(OS_CHROMEOS)
457 457
458 TEST_F(DownloadPathReservationTrackerTest, BasicTruncation) { 458 TEST_F(DownloadPathReservationTrackerTest, BasicTruncation) {
459 int real_max_length = 459 int real_max_length =
460 file_util::GetMaximumPathComponentLength(default_download_path()); 460 file_util::GetMaximumPathComponentLength(default_download_path());
461 ASSERT_NE(-1, real_max_length); 461 ASSERT_NE(-1, real_max_length);
462 462
463 // TODO(kinaba): the current implementation leaves spaces for appending 463 // TODO(kinaba): the current implementation leaves spaces for appending
464 // ".crdownload". So take it into account. Should be removed in the future. 464 // ".crdownload". So take it into account. Should be removed in the future.
465 const size_t max_length = real_max_length - 11; 465 const size_t max_length = real_max_length - 11;
466 466
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 ASSERT_FALSE(IsPathInUse(path)); 523 ASSERT_FALSE(IsPathInUse(path));
524 524
525 base::FilePath reserved_path; 525 base::FilePath reserved_path;
526 bool verified = false; 526 bool verified = false;
527 CallGetReservedPath(*item, path, false, &reserved_path, &verified); 527 CallGetReservedPath(*item, path, false, &reserved_path, &verified);
528 // We cannot truncate a path with very long extension. 528 // We cannot truncate a path with very long extension.
529 EXPECT_FALSE(verified); 529 EXPECT_FALSE(verified);
530 } 530 }
531 531
532 #endif 532 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698