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

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

Issue 1701163003: Hide non-native volumes when saving files from the browser. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests Created 4 years, 10 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/file_manager/url_util.cc ('k') | ui/file_manager/audio_player/js/audio_player.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 91f602b0e26a90492014c7e8c772c36fbf6b50a0..9cb996158b6d64e3b63a965f8b2843d7d77d5b2a 100644
--- a/chrome/browser/chromeos/file_manager/url_util_unittest.cc
+++ b/chrome/browser/chromeos/file_manager/url_util_unittest.cc
@@ -50,18 +50,19 @@ TEST(FileManagerUrlUtilTest, GetFileManagerMainPageUrlWithParams_NoFileTypes) {
EXPECT_TRUE(url.query().find("+") == std::string::npos);
EXPECT_TRUE(url.query().find("%20") != std::string::npos);
// The escaped query is hard to read. Pretty print the escaped JSON.
- EXPECT_EQ("{\n"
- " \"currentDirectoryURL\": "
- "\"filesystem:chrome-extension://abc/Downloads/\",\n"
- " \"defaultExtension\": \"txt\",\n"
- " \"selectionURL\": "
- "\"filesystem:chrome-extension://abc/Downloads/foo.txt\",\n"
- " \"shouldReturnLocalPath\": true,\n"
- " \"targetName\": \"foo.txt\",\n"
- " \"title\": \"some title\",\n"
- " \"type\": \"open-file\"\n"
- "}\n",
- PrettyPrintEscapedJson(url.query()));
+ EXPECT_EQ(
+ "{\n"
+ " \"allowedPaths\": \"nativePath\",\n"
+ " \"currentDirectoryURL\": "
+ "\"filesystem:chrome-extension://abc/Downloads/\",\n"
+ " \"defaultExtension\": \"txt\",\n"
+ " \"selectionURL\": "
+ "\"filesystem:chrome-extension://abc/Downloads/foo.txt\",\n"
+ " \"targetName\": \"foo.txt\",\n"
+ " \"title\": \"some title\",\n"
+ " \"type\": \"open-file\"\n"
+ "}\n",
+ PrettyPrintEscapedJson(url.query()));
}
TEST(FileManagerUrlUtilTest,
@@ -98,28 +99,29 @@ TEST(FileManagerUrlUtilTest,
EXPECT_TRUE(url.query().find("+") == std::string::npos);
EXPECT_TRUE(url.query().find("%20") != std::string::npos);
// The escaped query is hard to read. Pretty print the escaped JSON.
- EXPECT_EQ("{\n"
- " \"currentDirectoryURL\": "
- "\"filesystem:chrome-extension://abc/Downloads/\",\n"
- " \"defaultExtension\": \"txt\",\n"
- " \"includeAllFiles\": false,\n"
- " \"selectionURL\": "
- "\"filesystem:chrome-extension://abc/Downloads/foo.txt\",\n"
- " \"shouldReturnLocalPath\": false,\n"
- " \"targetName\": \"foo.txt\",\n"
- " \"title\": \"some title\",\n"
- " \"type\": \"open-file\",\n"
- " \"typeList\": [ {\n"
- " \"description\": \"HTML\",\n"
- " \"extensions\": [ \"htm\", \"html\" ],\n"
- " \"selected\": true\n"
- " }, {\n"
- " \"description\": \"TEXT\",\n"
- " \"extensions\": [ \"txt\" ],\n"
- " \"selected\": false\n"
- " } ]\n"
- "}\n",
- PrettyPrintEscapedJson(url.query()));
+ EXPECT_EQ(
+ "{\n"
+ " \"allowedPaths\": \"anyPath\",\n"
+ " \"currentDirectoryURL\": "
+ "\"filesystem:chrome-extension://abc/Downloads/\",\n"
+ " \"defaultExtension\": \"txt\",\n"
+ " \"includeAllFiles\": false,\n"
+ " \"selectionURL\": "
+ "\"filesystem:chrome-extension://abc/Downloads/foo.txt\",\n"
+ " \"targetName\": \"foo.txt\",\n"
+ " \"title\": \"some title\",\n"
+ " \"type\": \"open-file\",\n"
+ " \"typeList\": [ {\n"
+ " \"description\": \"HTML\",\n"
+ " \"extensions\": [ \"htm\", \"html\" ],\n"
+ " \"selected\": true\n"
+ " }, {\n"
+ " \"description\": \"TEXT\",\n"
+ " \"extensions\": [ \"txt\" ],\n"
+ " \"selected\": false\n"
+ " } ]\n"
+ "}\n",
+ PrettyPrintEscapedJson(url.query()));
}
} // namespace
« no previous file with comments | « chrome/browser/chromeos/file_manager/url_util.cc ('k') | ui/file_manager/audio_player/js/audio_player.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698