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

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: 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
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..5e0cbce49ee6a96ceeef89de6746e4f2040da462 100644
--- a/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
+++ b/chrome/browser/chromeos/gdata/gdata_file_system_unittest.cc
@@ -438,4 +438,22 @@ TEST_F(GDataFileSystemTest, FindFirstMissingParentDirectory) {
GDataFileSystem::DIRECTORY_ALREADY_PRESENT);
}
+TEST_F(GDataFileSystemTest, GetFile) {
+ // TODO(satorux): Write a test once DocumentsService is mockable.
zel 2012/03/02 23:44:04 maybe remove this test for now and just leave the
satorux1 2012/03/03 00:39:10 Done.
+}
+
+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

Powered by Google App Engine
This is Rietveld 408576698