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

Unified Diff: chrome/browser/chromeos/fileapi/external_file_url_util_unittest.cc

Issue 2437693002: arc: Add URL converter functions (Closed)
Patch Set: Anonymous namespace Created 4 years, 2 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 | « chrome/browser/chromeos/fileapi/external_file_url_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/fileapi/external_file_url_util_unittest.cc
diff --git a/chrome/browser/chromeos/fileapi/external_file_url_util_unittest.cc b/chrome/browser/chromeos/fileapi/external_file_url_util_unittest.cc
index e166c085ce5343846ee9e1c7cd9556d1281f380d..61486959e2e1461ceb9ddda2dbcfcba9fe81e5ac 100644
--- a/chrome/browser/chromeos/fileapi/external_file_url_util_unittest.cc
+++ b/chrome/browser/chromeos/fileapi/external_file_url_util_unittest.cc
@@ -8,6 +8,7 @@
#include "chrome/test/base/testing_browser_process.h"
#include "chrome/test/base/testing_profile_manager.h"
#include "components/drive/file_system_core_util.h"
+#include "content/public/common/url_constants.h"
#include "content/public/test/test_browser_thread_bundle.h"
#include "storage/browser/fileapi/file_system_url.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -78,4 +79,12 @@ TEST_F(ExternalFileURLUtilTest, FilePathToExternalFileURL) {
.AsUTF8Unsafe());
}
+TEST_F(ExternalFileURLUtilTest, VirtualPathToExternalFileURL) {
+ base::FilePath virtual_path(FILE_PATH_LITERAL("foo/bar012.txt"));
+ GURL result = VirtualPathToExternalFileURL(virtual_path);
+ EXPECT_TRUE(result.is_valid());
+ EXPECT_EQ(content::kExternalFileScheme, result.scheme());
+ EXPECT_EQ(virtual_path.value(), ExternalFileURLToVirtualPath(result).value());
+}
+
} // namespace chromeos
« no previous file with comments | « chrome/browser/chromeos/fileapi/external_file_url_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698