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 <stddef.h> |
| 6 |
5 #include <algorithm> | 7 #include <algorithm> |
6 #include <functional> | 8 #include <functional> |
7 #include <limits> | 9 #include <limits> |
8 #include <string> | 10 #include <string> |
9 #include <vector> | 11 #include <vector> |
10 | 12 |
11 #include "base/files/file.h" | 13 #include "base/files/file.h" |
12 #include "base/files/file_path.h" | 14 #include "base/files/file_path.h" |
13 #include "base/files/file_util.h" | 15 #include "base/files/file_util.h" |
14 #include "base/files/scoped_temp_dir.h" | 16 #include "base/files/scoped_temp_dir.h" |
| 17 #include "base/macros.h" |
15 #include "base/stl_util.h" | 18 #include "base/stl_util.h" |
16 #include "content/browser/fileapi/sandbox_database_test_helper.h" | 19 #include "content/browser/fileapi/sandbox_database_test_helper.h" |
17 #include "storage/browser/fileapi/sandbox_origin_database.h" | 20 #include "storage/browser/fileapi/sandbox_origin_database.h" |
18 #include "storage/common/fileapi/file_system_util.h" | 21 #include "storage/common/fileapi/file_system_util.h" |
19 #include "testing/gtest/include/gtest/gtest.h" | 22 #include "testing/gtest/include/gtest/gtest.h" |
20 #include "third_party/leveldatabase/src/db/filename.h" | 23 #include "third_party/leveldatabase/src/db/filename.h" |
21 #include "third_party/leveldatabase/src/include/leveldb/db.h" | 24 #include "third_party/leveldatabase/src/include/leveldb/db.h" |
22 | 25 |
23 using storage::SandboxOriginDatabase; | 26 using storage::SandboxOriginDatabase; |
24 | 27 |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
296 | 299 |
297 const std::string kOrigin2("piyo.example.org"); | 300 const std::string kOrigin2("piyo.example.org"); |
298 EXPECT_FALSE(database->HasOriginPath(kOrigin2)); | 301 EXPECT_FALSE(database->HasOriginPath(kOrigin2)); |
299 EXPECT_TRUE(database->GetPathForOrigin(kOrigin2, &path)); | 302 EXPECT_TRUE(database->GetPathForOrigin(kOrigin2, &path)); |
300 EXPECT_FALSE(path.empty()); | 303 EXPECT_FALSE(path.empty()); |
301 EXPECT_TRUE(database->HasOriginPath(kOrigin2)); | 304 EXPECT_TRUE(database->HasOriginPath(kOrigin2)); |
302 } | 305 } |
303 } | 306 } |
304 | 307 |
305 } // namespace content | 308 } // namespace content |
OLD | NEW |