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

Unified Diff: chrome/browser/chromeos/file_manager/url_util_unittest.cc

Issue 132453007: Migrate fullPaths to URLs in appState. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 6 years, 11 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
Index: chrome/browser/chromeos/file_manager/url_util_unittest.cc
diff --git a/chrome/browser/chromeos/file_manager/url_util_unittest.cc b/chrome/browser/chromeos/file_manager/url_util_unittest.cc
index cd24c18d9c68e7fca934b0e2b117d1ce86ba3d62..20ad4eeee09fffaeebe2ad3eebe7e70d79f93ee0 100644
--- a/chrome/browser/chromeos/file_manager/url_util_unittest.cc
+++ b/chrome/browser/chromeos/file_manager/url_util_unittest.cc
@@ -43,8 +43,9 @@ TEST(FileManagerUrlUtilTest, GetFileManagerMainPageUrlWithParams_NoFileTypes) {
const GURL url = GetFileManagerMainPageUrlWithParams(
ui::SelectFileDialog::SELECT_OPEN_FILE,
base::UTF8ToUTF16("some title"),
- base::FilePath::FromUTF8Unsafe("/Downloads"),
- base::FilePath::FromUTF8Unsafe("/Downloads/foo.txt"),
+ GURL("filesystem:chrome-extension://abc/Downloads/"),
+ GURL("filesystem:chrome-extension://abc/Downloads/foo.txt"),
+ "foo.txt",
NULL, // No file types
0, // Hence no file type index.
FILE_PATH_LITERAL("txt"));
@@ -56,9 +57,11 @@ TEST(FileManagerUrlUtilTest, GetFileManagerMainPageUrlWithParams_NoFileTypes) {
EXPECT_TRUE(url.query().find("%20") != std::string::npos);
// The escaped query is hard to read. Pretty print the escaped JSON.
EXPECT_EQ("{\n"
- " \"currentDirectoryPath\": \"/Downloads\",\n"
+ " \"currentDirectoryURL\": "
+ "\"filesystem:chrome-extension://abc/Downloads/\",\n"
" \"defaultExtension\": \"txt\",\n"
- " \"selectionPath\": \"/Downloads/foo.txt\",\n"
+ " \"selectionURL\": "
+ "\"filesystem:chrome-extension://abc/Downloads/foo.txt\",\n"
" \"shouldReturnLocalPath\": true,\n"
" \"targetName\": \"foo.txt\",\n"
" \"title\": \"some title\",\n"
@@ -88,8 +91,9 @@ TEST(FileManagerUrlUtilTest,
const GURL url = GetFileManagerMainPageUrlWithParams(
ui::SelectFileDialog::SELECT_OPEN_FILE,
base::UTF8ToUTF16("some title"),
- base::FilePath::FromUTF8Unsafe("/Downloads"),
- base::FilePath::FromUTF8Unsafe("/Downloads/foo.txt"),
+ GURL("filesystem:chrome-extension://abc/Downloads/"),
+ GURL("filesystem:chrome-extension://abc/Downloads/foo.txt"),
+ "foo.txt",
&file_types,
1, // The file type index is 1-based.
FILE_PATH_LITERAL("txt"));
@@ -101,10 +105,12 @@ TEST(FileManagerUrlUtilTest,
EXPECT_TRUE(url.query().find("%20") != std::string::npos);
// The escaped query is hard to read. Pretty print the escaped JSON.
EXPECT_EQ("{\n"
- " \"currentDirectoryPath\": \"/Downloads\",\n"
+ " \"currentDirectoryURL\": "
+ "\"filesystem:chrome-extension://abc/Downloads/\",\n"
" \"defaultExtension\": \"txt\",\n"
" \"includeAllFiles\": false,\n"
- " \"selectionPath\": \"/Downloads/foo.txt\",\n"
+ " \"selectionURL\": "
+ "\"filesystem:chrome-extension://abc/Downloads/foo.txt\",\n"
" \"shouldReturnLocalPath\": false,\n"
" \"targetName\": \"foo.txt\",\n"
" \"title\": \"some title\",\n"
« no previous file with comments | « chrome/browser/chromeos/file_manager/url_util.cc ('k') | chrome/browser/resources/file_manager/background/js/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698