| 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 c1c01a37331ff910a9c821d9ec870f345e7324e1..61e67f0a0f4827f0bed01f2c116b2ca4f124b18c 100644
|
| --- a/webkit/fileapi/file_system_url_unittest.cc
|
| +++ b/webkit/fileapi/file_system_url_unittest.cc
|
| @@ -26,7 +26,22 @@ namespace fileapi {
|
| namespace {
|
|
|
| FileSystemURL CreateFileSystemURL(const std::string& url_string) {
|
| - return FileSystemURL(GURL(url_string));
|
| + FileSystemURL url = FileSystemURL(GURL(url_string));
|
| + switch (url.type()) {
|
| + case kFileSystemTypeExternal:
|
| + return ExternalMountPoints::GetSystemInstance()->CrackURL(url);
|
| + case kFileSystemTypeIsolated:
|
| + return IsolatedContext::GetInstance()->CrackURL(url);
|
| + default:
|
| + return url;
|
| + }
|
| +}
|
| +
|
| +FileSystemURL CreateExternalFileSystemURL(const GURL& origin,
|
| + FileSystemType type,
|
| + const FilePath& path) {
|
| + FileSystemURL url(origin, type, path);
|
| + return ExternalMountPoints::GetSystemInstance()->CrackURL(url);
|
| }
|
|
|
| std::string NormalizedUTF8Path(const FilePath& path) {
|
| @@ -225,8 +240,10 @@ TEST(FileSystemURLTest, DebugString) {
|
| ScopedExternalFileSystem scoped_fs("foo",
|
| kFileSystemTypeNativeLocal,
|
| kRoot.NormalizePathSeparators());
|
| - const FileSystemURL kURL2(kOrigin, kFileSystemTypeExternal,
|
| - scoped_fs.GetVirtualRootPath().Append(kPath));
|
| + const FileSystemURL kURL2(CreateExternalFileSystemURL(
|
| + kOrigin,
|
| + kFileSystemTypeExternal,
|
| + scoped_fs.GetVirtualRootPath().Append(kPath)));
|
| EXPECT_EQ("filesystem:http://example.com/external/" +
|
| NormalizedUTF8Path(scoped_fs.GetVirtualRootPath().Append(kPath)) +
|
| " (NativeLocal@foo:" +
|
|
|