OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/browser/fileapi/sandbox_directory_database.h" | 5 #include "storage/browser/fileapi/sandbox_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" |
11 #include "base/files/file.h" | 11 #include "base/files/file.h" |
12 #include "base/files/scoped_temp_dir.h" | 12 #include "base/files/scoped_temp_dir.h" |
13 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
14 #include "base/strings/string_number_conversions.h" | 14 #include "base/strings/string_number_conversions.h" |
15 #include "base/strings/string_util.h" | 15 #include "base/strings/string_util.h" |
16 #include "content/browser/fileapi/sandbox_database_test_helper.h" | 16 #include "content/browser/fileapi/sandbox_database_test_helper.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 17 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "third_party/leveldatabase/src/include/leveldb/db.h" | 18 #include "third_party/leveldatabase/src/include/leveldb/db.h" |
19 #include "webkit/common/fileapi/file_system_util.h" | 19 #include "storage/common/fileapi/file_system_util.h" |
20 | 20 |
21 #define FPL(x) FILE_PATH_LITERAL(x) | 21 #define FPL(x) FILE_PATH_LITERAL(x) |
22 | 22 |
23 using fileapi::FilePathToString; | 23 using storage::FilePathToString; |
24 using fileapi::SandboxDirectoryDatabase; | 24 using storage::SandboxDirectoryDatabase; |
25 | 25 |
26 namespace content { | 26 namespace content { |
27 | 27 |
28 namespace { | 28 namespace { |
29 const base::FilePath::CharType kDirectoryDatabaseName[] = FPL("Paths"); | 29 const base::FilePath::CharType kDirectoryDatabaseName[] = FPL("Paths"); |
30 } | 30 } |
31 | 31 |
32 class SandboxDirectoryDatabaseTest : public testing::Test { | 32 class SandboxDirectoryDatabaseTest : public testing::Test { |
33 public: | 33 public: |
34 typedef SandboxDirectoryDatabase::FileId FileId; | 34 typedef SandboxDirectoryDatabase::FileId FileId; |
(...skipping 631 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
666 EXPECT_FALSE(db()->IsFileSystemConsistent()); | 666 EXPECT_FALSE(db()->IsFileSystemConsistent()); |
667 | 667 |
668 FileId file_id; | 668 FileId file_id; |
669 EXPECT_TRUE(db()->GetChildWithName(0, kFileName, &file_id)); | 669 EXPECT_TRUE(db()->GetChildWithName(0, kFileName, &file_id)); |
670 EXPECT_EQ(file_id_prev, file_id); | 670 EXPECT_EQ(file_id_prev, file_id); |
671 | 671 |
672 EXPECT_TRUE(db()->IsFileSystemConsistent()); | 672 EXPECT_TRUE(db()->IsFileSystemConsistent()); |
673 } | 673 } |
674 | 674 |
675 } // namespace content | 675 } // namespace content |
OLD | NEW |