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

Unified Diff: webkit/fileapi/file_system_url_unittest.cc

Issue 15754005: Fix dependency: make file_system_util not depend on FileSystemURL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webkit/fileapi/file_system_url.cc ('k') | webkit/fileapi/file_system_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/fileapi/file_system_url_unittest.cc
diff --git a/webkit/fileapi/file_system_url_unittest.cc b/webkit/fileapi/file_system_url_unittest.cc
index b6845cf3c538bfec32f6a55e08f9d2b283a82b01..116bc9179c689d9ac29884dd7ec0d3c60cd38f32 100644
--- a/webkit/fileapi/file_system_url_unittest.cc
+++ b/webkit/fileapi/file_system_url_unittest.cc
@@ -168,4 +168,28 @@ TEST(FileSystemURLTest, DebugString) {
kURL1.DebugString());
}
+TEST(FileSystemURLTest, IsInSameFileSystem) {
+ FileSystemURL url_foo_temp_a = FileSystemURL::CreateForTest(
+ GURL("http://foo"), kFileSystemTypeTemporary,
+ base::FilePath::FromUTF8Unsafe("a"));
+ FileSystemURL url_foo_temp_b = FileSystemURL::CreateForTest(
+ GURL("http://foo"), kFileSystemTypeTemporary,
+ base::FilePath::FromUTF8Unsafe("b"));
+ FileSystemURL url_foo_perm_a = FileSystemURL::CreateForTest(
+ GURL("http://foo"), kFileSystemTypePersistent,
+ base::FilePath::FromUTF8Unsafe("a"));
+ FileSystemURL url_bar_temp_a = FileSystemURL::CreateForTest(
+ GURL("http://bar"), kFileSystemTypeTemporary,
+ base::FilePath::FromUTF8Unsafe("a"));
+ FileSystemURL url_bar_perm_a = FileSystemURL::CreateForTest(
+ GURL("http://bar"), kFileSystemTypePersistent,
+ base::FilePath::FromUTF8Unsafe("a"));
+
+ EXPECT_TRUE(url_foo_temp_a.IsInSameFileSystem(url_foo_temp_a));
+ EXPECT_TRUE(url_foo_temp_a.IsInSameFileSystem(url_foo_temp_b));
+ EXPECT_FALSE(url_foo_temp_a.IsInSameFileSystem(url_foo_perm_a));
+ EXPECT_FALSE(url_foo_temp_a.IsInSameFileSystem(url_bar_temp_a));
+ EXPECT_FALSE(url_foo_temp_a.IsInSameFileSystem(url_bar_perm_a));
+}
+
} // namespace fileapi
« no previous file with comments | « webkit/fileapi/file_system_url.cc ('k') | webkit/fileapi/file_system_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698