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

Unified Diff: google_apis/drive/drive_api_parser_unittest.cc

Issue 2885323002: Add URL generator / json parser for getting start_page_token of changes. (Closed)
Patch Set: Created 3 years, 7 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 | « google_apis/drive/drive_api_parser.cc ('k') | google_apis/drive/drive_api_url_generator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/drive/drive_api_parser_unittest.cc
diff --git a/google_apis/drive/drive_api_parser_unittest.cc b/google_apis/drive/drive_api_parser_unittest.cc
index 443b692dbd978bc2d896b0140c515e790553be2c..fffd9f13605a442bbe653ed90d3239b614bc4ee9 100644
--- a/google_apis/drive/drive_api_parser_unittest.cc
+++ b/google_apis/drive/drive_api_parser_unittest.cc
@@ -250,6 +250,20 @@ TEST(DriveAPIParserTest, FileListParser) {
EXPECT_EQ(0U, file3.open_with_links().size());
}
+// Test start page token parsing.
+TEST(DriveAPIParserTest, StartPageTokenParser) {
+ std::string error;
+ std::unique_ptr<base::Value> document =
+ test_util::LoadJSONFile("drive/changes_start_page_token.json");
+ ASSERT_TRUE(document.get());
+ ASSERT_EQ(base::Value::Type::DICTIONARY, document->GetType());
+
+ std::unique_ptr<StartPageToken> start_page_token(new StartPageToken);
+ EXPECT_TRUE(start_page_token->Parse(*document));
+
+ EXPECT_EQ("TheStartPageToken", start_page_token->start_page_token());
+}
+
// Test change list parsing.
TEST(DriveAPIParserTest, ChangeListParser) {
std::string error;
« no previous file with comments | « google_apis/drive/drive_api_parser.cc ('k') | google_apis/drive/drive_api_url_generator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698