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

Side by Side Diff: content/browser/fileapi/file_system_url_unittest.cc

Issue 253753007: Move all remaining fileapi and quota unit tests from webkit/ to content/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address feedback Created 6 years, 7 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/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/common/fileapi/file_system_types.h" 10 #include "webkit/common/fileapi/file_system_types.h"
11 #include "webkit/common/fileapi/file_system_util.h" 11 #include "webkit/common/fileapi/file_system_util.h"
12 12
13 #define FPL FILE_PATH_LITERAL 13 #define FPL FILE_PATH_LITERAL
14 14
15 #if defined(FILE_PATH_USES_DRIVE_LETTERS) 15 #if defined(FILE_PATH_USES_DRIVE_LETTERS)
16 #define DRIVE FPL("C:") 16 #define DRIVE FPL("C:")
17 #else 17 #else
18 #define DRIVE FPL("/a/") 18 #define DRIVE FPL("/a/")
19 #endif 19 #endif
20 20
21 namespace fileapi { 21 using fileapi::FileSystemURL;
22 using fileapi::kFileSystemTypeExternal;
23 using fileapi::kFileSystemTypeIsolated;
24 using fileapi::kFileSystemTypePersistent;
25 using fileapi::kFileSystemTypeTemporary;
26 using fileapi::VirtualPath;
27
28 namespace content {
22 29
23 namespace { 30 namespace {
24 31
25 FileSystemURL CreateFileSystemURL(const std::string& url_string) { 32 FileSystemURL CreateFileSystemURL(const std::string& url_string) {
26 FileSystemURL url = FileSystemURL::CreateForTest(GURL(url_string)); 33 FileSystemURL url = FileSystemURL::CreateForTest(GURL(url_string));
27 EXPECT_TRUE(url.type() != kFileSystemTypeExternal && 34 EXPECT_TRUE(url.type() != kFileSystemTypeExternal &&
28 url.type() != kFileSystemTypeIsolated); 35 url.type() != kFileSystemTypeIsolated);
29 return url; 36 return url;
30 } 37 }
31 38
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 GURL("http://bar"), kFileSystemTypePersistent, 210 GURL("http://bar"), kFileSystemTypePersistent,
204 base::FilePath::FromUTF8Unsafe("a")); 211 base::FilePath::FromUTF8Unsafe("a"));
205 212
206 EXPECT_TRUE(url_foo_temp_a.IsInSameFileSystem(url_foo_temp_a)); 213 EXPECT_TRUE(url_foo_temp_a.IsInSameFileSystem(url_foo_temp_a));
207 EXPECT_TRUE(url_foo_temp_a.IsInSameFileSystem(url_foo_temp_b)); 214 EXPECT_TRUE(url_foo_temp_a.IsInSameFileSystem(url_foo_temp_b));
208 EXPECT_FALSE(url_foo_temp_a.IsInSameFileSystem(url_foo_perm_a)); 215 EXPECT_FALSE(url_foo_temp_a.IsInSameFileSystem(url_foo_perm_a));
209 EXPECT_FALSE(url_foo_temp_a.IsInSameFileSystem(url_bar_temp_a)); 216 EXPECT_FALSE(url_foo_temp_a.IsInSameFileSystem(url_bar_temp_a));
210 EXPECT_FALSE(url_foo_temp_a.IsInSameFileSystem(url_bar_perm_a)); 217 EXPECT_FALSE(url_foo_temp_a.IsInSameFileSystem(url_bar_perm_a));
211 } 218 }
212 219
213 } // namespace fileapi 220 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/fileapi/external_mount_points_unittest.cc ('k') | content/browser/fileapi/file_system_usage_cache_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698