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

Unified Diff: google_apis/drive/drive_api_url_generator_unittest.cc

Issue 2910913002: WIP.
Patch Set: rebase 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_url_generator.cc ('k') | google_apis/drive/files_list_request_runner.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: google_apis/drive/drive_api_url_generator_unittest.cc
diff --git a/google_apis/drive/drive_api_url_generator_unittest.cc b/google_apis/drive/drive_api_url_generator_unittest.cc
index 43bc4524b7d1d840cb30127e1c8afae6af33d30f..f14032eefaca68bb4d081efa67f266b4cbfcdac5 100644
--- a/google_apis/drive/drive_api_url_generator_unittest.cc
+++ b/google_apis/drive/drive_api_url_generator_unittest.cc
@@ -204,24 +204,36 @@ TEST_F(DriveApiUrlGeneratorTest, GetFilesListUrl) {
const std::string kV2FilesUrlPrefix =
"https://www.example.com/drive/v2/files";
const std::string kV2FilesUrlPrefixWithTeamDrives =
- "https://www.example.com/drive/v2/files?"
- "supportsTeamDrives=true&includeTeamDriveItems=true";
+ "https://www.example.com/drive/v2/files?supportsTeamDrives=true&"
+ "includeTeamDriveItems=true&corpora=default%2CallTeamDrives";
for (size_t i = 0; i < arraysize(kTestPatterns); ++i) {
EXPECT_EQ(kV2FilesUrlPrefix +
(kTestPatterns[i].expected_query.empty() ? "" : "?") +
kTestPatterns[i].expected_query,
- url_generator_.GetFilesListUrl(kTestPatterns[i].max_results,
- kTestPatterns[i].page_token,
- kTestPatterns[i].q).spec());
+ url_generator_
+ .GetFilesListUrl(kTestPatterns[i].max_results,
+ kTestPatterns[i].page_token, CORPORA_DEFAULT,
+ "", kTestPatterns[i].q)
+ .spec());
EXPECT_EQ(kV2FilesUrlPrefixWithTeamDrives +
(kTestPatterns[i].expected_query.empty() ? "" : "&") +
kTestPatterns[i].expected_query,
- team_drives_url_generator_.GetFilesListUrl(
- kTestPatterns[i].max_results,
- kTestPatterns[i].page_token,
- kTestPatterns[i].q).spec());
+ team_drives_url_generator_
+ .GetFilesListUrl(
+ kTestPatterns[i].max_results, kTestPatterns[i].page_token,
+ CORPORA_ALL_TEAM_DRIVES, "", kTestPatterns[i].q)
+ .spec());
}
+
+ EXPECT_EQ(
+ "https://www.example.com/drive/v2/files?supportsTeamDrives=true&"
+ "includeTeamDriveItems=true&corpora=teamDrive&"
+ "teamDriveId=TheTeamDriveId&q=query",
+ team_drives_url_generator_
+ .GetFilesListUrl(100, "" /* page_token */, CORPORA_TEAM_DRIVE,
+ "TheTeamDriveId", "query")
+ .spec());
}
TEST_F(DriveApiUrlGeneratorTest, GetFilesDeleteUrl) {
« no previous file with comments | « google_apis/drive/drive_api_url_generator.cc ('k') | google_apis/drive/files_list_request_runner.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698