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

Side by Side Diff: webkit/fileapi/file_system_directory_database_unittest.cc

Issue 13145003: Rewrite std::string("") to std::string(), Linux edition. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Ugh Created 7 years, 8 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 "webkit/fileapi/file_system_directory_database.h" 5 #include "webkit/fileapi/file_system_directory_database.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <limits> 8 #include <limits>
9 9
10 #include "base/file_util.h" 10 #include "base/file_util.h"
(...skipping 551 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 &created, &error); 562 &created, &error);
563 ASSERT_EQ(base::PLATFORM_FILE_OK, error); 563 ASSERT_EQ(base::PLATFORM_FILE_OK, error);
564 ASSERT_TRUE(created); 564 ASSERT_TRUE(created);
565 ASSERT_TRUE(base::ClosePlatformFile(file)); 565 ASSERT_TRUE(base::ClosePlatformFile(file));
566 566
567 EXPECT_TRUE(db()->IsFileSystemConsistent()); 567 EXPECT_TRUE(db()->IsFileSystemConsistent());
568 } 568 }
569 569
570 TEST_F(FileSystemDirectoryDatabaseTest, TestConsistencyCheck_RootLoop) { 570 TEST_F(FileSystemDirectoryDatabaseTest, TestConsistencyCheck_RootLoop) {
571 EXPECT_TRUE(db()->IsFileSystemConsistent()); 571 EXPECT_TRUE(db()->IsFileSystemConsistent());
572 MakeHierarchyLink(0, 0, FPL("")); 572 MakeHierarchyLink(0, 0, base::FilePath::StringType());
573 EXPECT_FALSE(db()->IsFileSystemConsistent()); 573 EXPECT_FALSE(db()->IsFileSystemConsistent());
574 } 574 }
575 575
576 TEST_F(FileSystemDirectoryDatabaseTest, TestConsistencyCheck_DirectoryLoop) { 576 TEST_F(FileSystemDirectoryDatabaseTest, TestConsistencyCheck_DirectoryLoop) {
577 FileId dir1_id; 577 FileId dir1_id;
578 FileId dir2_id; 578 FileId dir2_id;
579 base::FilePath::StringType dir1_name = FPL("foo"); 579 base::FilePath::StringType dir1_name = FPL("foo");
580 CreateDirectory(0, dir1_name, &dir1_id); 580 CreateDirectory(0, dir1_name, &dir1_id);
581 CreateDirectory(dir1_id, FPL("bar"), &dir2_id); 581 CreateDirectory(dir1_id, FPL("bar"), &dir2_id);
582 582
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
644 -1, 1); 644 -1, 1);
645 InitDatabase(); 645 InitDatabase();
646 EXPECT_FALSE(db()->IsFileSystemConsistent()); 646 EXPECT_FALSE(db()->IsFileSystemConsistent());
647 647
648 FileId file_id; 648 FileId file_id;
649 EXPECT_FALSE(db()->GetChildWithName(0, kFileName, &file_id)); 649 EXPECT_FALSE(db()->GetChildWithName(0, kFileName, &file_id));
650 EXPECT_TRUE(db()->IsFileSystemConsistent()); 650 EXPECT_TRUE(db()->IsFileSystemConsistent());
651 } 651 }
652 652
653 } // namespace fileapi 653 } // namespace fileapi
OLDNEW
« no previous file with comments | « webkit/fileapi/external_mount_points_unittest.cc ('k') | webkit/fileapi/file_system_origin_database.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698