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 "webkit/browser/fileapi/file_system_url.h" | 5 #include "webkit/browser/fileapi/file_system_url.h" |
6 | 6 |
7 #include "base/files/file_path.h" | 7 #include "base/files/file_path.h" |
8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
9 #include "url/gurl.h" | 9 #include "url/gurl.h" |
10 #include "webkit/browser/fileapi/syncable/syncable_file_system_util.h" | |
11 #include "webkit/common/fileapi/file_system_types.h" | 10 #include "webkit/common/fileapi/file_system_types.h" |
12 #include "webkit/common/fileapi/file_system_util.h" | 11 #include "webkit/common/fileapi/file_system_util.h" |
13 | 12 |
14 #define FPL FILE_PATH_LITERAL | 13 #define FPL FILE_PATH_LITERAL |
15 | 14 |
16 #if defined(FILE_PATH_USES_DRIVE_LETTERS) | 15 #if defined(FILE_PATH_USES_DRIVE_LETTERS) |
17 #define DRIVE FPL("C:") | 16 #define DRIVE FPL("C:") |
18 #else | 17 #else |
19 #define DRIVE FPL("/a/") | 18 #define DRIVE FPL("/a/") |
20 #endif | 19 #endif |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 base::FilePath::FromUTF8Unsafe("a")); | 185 base::FilePath::FromUTF8Unsafe("a")); |
187 | 186 |
188 EXPECT_TRUE(url_foo_temp_a.IsInSameFileSystem(url_foo_temp_a)); | 187 EXPECT_TRUE(url_foo_temp_a.IsInSameFileSystem(url_foo_temp_a)); |
189 EXPECT_TRUE(url_foo_temp_a.IsInSameFileSystem(url_foo_temp_b)); | 188 EXPECT_TRUE(url_foo_temp_a.IsInSameFileSystem(url_foo_temp_b)); |
190 EXPECT_FALSE(url_foo_temp_a.IsInSameFileSystem(url_foo_perm_a)); | 189 EXPECT_FALSE(url_foo_temp_a.IsInSameFileSystem(url_foo_perm_a)); |
191 EXPECT_FALSE(url_foo_temp_a.IsInSameFileSystem(url_bar_temp_a)); | 190 EXPECT_FALSE(url_foo_temp_a.IsInSameFileSystem(url_bar_temp_a)); |
192 EXPECT_FALSE(url_foo_temp_a.IsInSameFileSystem(url_bar_perm_a)); | 191 EXPECT_FALSE(url_foo_temp_a.IsInSameFileSystem(url_bar_perm_a)); |
193 } | 192 } |
194 | 193 |
195 } // namespace fileapi | 194 } // namespace fileapi |
OLD | NEW |