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

Unified Diff: chrome/browser/google_apis/drive_api_parser_unittest.cc

Issue 14160002: Add HasChangeListKind and HasFileListKind methods. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit tests Created 7 years, 8 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/google_apis/drive_api_parser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/google_apis/drive_api_parser_unittest.cc
diff --git a/chrome/browser/google_apis/drive_api_parser_unittest.cc b/chrome/browser/google_apis/drive_api_parser_unittest.cc
index 4597c80fe21878534e67ede0237ba54d44680810..5860dee300cb00e6c92b5d0cfe18cca6250e59f8 100644
--- a/chrome/browser/google_apis/drive_api_parser_unittest.cc
+++ b/chrome/browser/google_apis/drive_api_parser_unittest.cc
@@ -409,6 +409,19 @@ TEST(DriveAPIParserTest, ChangeListParser) {
EXPECT_EQ(change4.file_id(), entry4->resource_id());
EXPECT_EQ(change4.is_deleted(), entry4->deleted());
}
+
+TEST(DriveAPIParserTest, HasKind) {
+ scoped_ptr<base::Value> change_list_json(
+ test_util::LoadJSONFile("chromeos/drive/changelist.json"));
+ scoped_ptr<base::Value> file_list_json(
+ test_util::LoadJSONFile("chromeos/drive/filelist.json"));
+
+ EXPECT_TRUE(ChangeList::HasChangeListKind(*change_list_json));
+ EXPECT_FALSE(ChangeList::HasChangeListKind(*file_list_json));
+
+ EXPECT_FALSE(FileList::HasFileListKind(*change_list_json));
+ EXPECT_TRUE(FileList::HasFileListKind(*file_list_json));
+}
#endif // OS_CHROMEOS
} // namespace google_apis
« no previous file with comments | « chrome/browser/google_apis/drive_api_parser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698