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

Unified Diff: chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc

Issue 9583031: gdata:: Add GDataFileSystem::GetFile(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 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/gdata/gdata_file_system.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/gdata/gdata_file_system_unittest.cc
diff --git a/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc b/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
index a867af2f223a7d680fc9c53a569944fd009cacc3..b0b2aa1378e15b2c8e0d481c56b1125a1494d56c 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
@@ -438,4 +438,21 @@ TEST_F(GDataFileSystemTest, FindFirstMissingParentDirectory) {
GDataFileSystem::DIRECTORY_ALREADY_PRESENT);
}
+// TODO(satorux): Write a test for GetFile() once DocumentsService is
+// mockable.
+
+TEST_F(GDataFileSystemTest, GetGDataFileInfoFromPath) {
+ LoadRootFeedDocument("root_feed.json");
+
+ GDataFileBase* file_info = file_system_->GetGDataFileInfoFromPath(
+ FilePath(FILE_PATH_LITERAL("gdata/File 1.txt")));
+ ASSERT_TRUE(file_info != NULL);
+ EXPECT_EQ("https://file_link_self/", file_info->self_url().spec());
+ EXPECT_EQ("https://file_content_url/", file_info->content_url().spec());
+
+ GDataFileBase* non_existent = file_system_->GetGDataFileInfoFromPath(
+ FilePath(FILE_PATH_LITERAL("gdata/Nonexistent.txt")));
+ ASSERT_TRUE(non_existent == NULL);
+}
+
} // namespace gdata
« no previous file with comments | « chrome/browser/chromeos/gdata/gdata_file_system.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698