| Index: content/common/fileapi/file_system_util_unittest.cc
|
| diff --git a/content/common/fileapi/file_system_util_unittest.cc b/content/common/fileapi/file_system_util_unittest.cc
|
| index 61dac02933350fbfb491d1e2956a06e8830270ee..a82dc906f552a473894582393dd222756545d294 100644
|
| --- a/content/common/fileapi/file_system_util_unittest.cc
|
| +++ b/content/common/fileapi/file_system_util_unittest.cc
|
| @@ -10,7 +10,9 @@
|
|
|
| using fileapi::CrackIsolatedFileSystemName;
|
| using fileapi::FileSystemType;
|
| +using fileapi::GetExternalFileSystemRootURIString;
|
| using fileapi::GetIsolatedFileSystemName;
|
| +using fileapi::GetIsolatedFileSystemRootURIString;
|
| using fileapi::ValidateIsolatedFileSystemId;
|
| using fileapi::VirtualPath;
|
|
|
| @@ -281,5 +283,26 @@ TEST_F(FileSystemUtilTest, ValidateIsolatedFileSystemId) {
|
| EXPECT_FALSE(ValidateIsolatedFileSystemId(kSpaceId));
|
| }
|
|
|
| +TEST_F(FileSystemUtilTest, GetIsolatedFileSystemRootURIString) {
|
| + const GURL kOriginURL("http://foo");
|
| + // Percents must be escaped, otherwise they will be unintentionally unescaped.
|
| + const std::string kFileSystemId = "A%20B";
|
| + const std::string kRootName = "C%20D";
|
| +
|
| + const std::string url_string =
|
| + GetIsolatedFileSystemRootURIString(kOriginURL, kFileSystemId, kRootName);
|
| + EXPECT_EQ("filesystem:http://foo/isolated/A%2520B/C%2520D/", url_string);
|
| +}
|
| +
|
| +TEST_F(FileSystemUtilTest, GetExternalFileSystemRootURIString) {
|
| + const GURL kOriginURL("http://foo");
|
| + // Percents must be escaped, otherwise they will be unintentionally unescaped.
|
| + const std::string kMountName = "X%20Y";
|
| +
|
| + const std::string url_string =
|
| + GetExternalFileSystemRootURIString(kOriginURL, kMountName);
|
| + EXPECT_EQ("filesystem:http://foo/external/X%2520Y/", url_string);
|
| +}
|
| +
|
| } // namespace
|
| } // namespace content
|
|
|