| Index: chrome/browser/chromeos/arc/fileapi/arc_content_file_system_url_util_unittest.cc
|
| diff --git a/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_url_util_unittest.cc b/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_url_util_unittest.cc
|
| index a8b4de9ca9863569ae474644aec2ccb488e4935e..4e5774328dfa870a39bdf24cc0674e435c82ce71 100644
|
| --- a/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_url_util_unittest.cc
|
| +++ b/chrome/browser/chromeos/arc/fileapi/arc_content_file_system_url_util_unittest.cc
|
| @@ -4,13 +4,15 @@
|
|
|
| #include "base/strings/utf_string_conversions.h"
|
| #include "chrome/browser/chromeos/arc/fileapi/arc_content_file_system_url_util.h"
|
| +#include "chrome/browser/chromeos/fileapi/external_file_url_util.h"
|
| #include "content/public/common/url_constants.h"
|
| +#include "storage/browser/fileapi/file_system_url.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
| #include "url/gurl.h"
|
|
|
| namespace arc {
|
|
|
| -TEST(ArcContentFileSystemUrlUtilTest, EncodeAndDecode) {
|
| +TEST(ArcContentFileSystemUrlUtilTest, EncodeAndDecodeExternalFileUrl) {
|
| {
|
| GURL src("file://foo/bar/baz");
|
| GURL dest = ArcUrlToExternalFileUrl(src);
|
| @@ -62,4 +64,23 @@ TEST(ArcContentFileSystemUrlUtilTest, EncodeAndDecode) {
|
| }
|
| }
|
|
|
| +TEST(ArcContentFileSystemUrlUtilTest, FileSystemUrlToArcUrl) {
|
| + GURL arc_url("content://org.chromium.foo/bar/baz");
|
| + GURL externalfile_url = ArcUrlToExternalFileUrl(arc_url);
|
| + base::FilePath virtual_path =
|
| + chromeos::ExternalFileURLToVirtualPath(externalfile_url);
|
| +
|
| + base::FilePath mount_point_virtual_path =
|
| + base::FilePath::FromUTF8Unsafe(kMountPointName);
|
| + base::FilePath path(kMountPointPath);
|
| + EXPECT_TRUE(mount_point_virtual_path.AppendRelativePath(virtual_path, &path));
|
| +
|
| + storage::FileSystemURL file_system_url =
|
| + storage::FileSystemURL::CreateForTest(GURL(), // origin
|
| + storage::kFileSystemTypeArcContent,
|
| + path);
|
| +
|
| + EXPECT_EQ(arc_url, FileSystemUrlToArcUrl(file_system_url));
|
| +}
|
| +
|
| } // namespace arc
|
|
|