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

Unified Diff: google_apis/drive/drive_api_url_generator_unittest.cc

Issue 1965963003: Use new API to download blobs from Google Drive. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 3d63370ca60d75f6bc67f0cada8f03e8fb50594c..29d85f142e5f3c8d932ff012a9f5dc330cc37406 100644
--- a/google_apis/drive/drive_api_url_generator_unittest.cc
+++ b/google_apis/drive/drive_api_url_generator_unittest.cc
@@ -18,7 +18,6 @@ namespace {
// The URLs used for production may be different for Chromium OS and Chrome
// OS, so use testing base urls.
const char kBaseUrlForTesting[] = "https://www.example.com";
-const char kBaseDownloadUrlForTesting[] = "https://download.example.com/p/";
const char kBaseThumbnailUrlForTesting[] = "https://thumbnail.example.com";
} // namespace
@@ -26,7 +25,6 @@ class DriveApiUrlGeneratorTest : public testing::Test {
public:
DriveApiUrlGeneratorTest()
: url_generator_(GURL(kBaseUrlForTesting),
- GURL(kBaseDownloadUrlForTesting),
GURL(kBaseThumbnailUrlForTesting)) {}
protected:
@@ -362,10 +360,12 @@ TEST_F(DriveApiUrlGeneratorTest, GetMultipartUploadExistingFileUrl) {
}
TEST_F(DriveApiUrlGeneratorTest, GenerateDownloadFileUrl) {
- EXPECT_EQ("https://download.example.com/p/host/resourceId",
- url_generator_.GenerateDownloadFileUrl("resourceId").spec());
- EXPECT_EQ("https://download.example.com/p/host/file%3AresourceId",
- url_generator_.GenerateDownloadFileUrl("file:resourceId").spec());
+ EXPECT_EQ(
+ "https://www.example.com/drive/v2/files/resourceId?alt=media",
+ url_generator_.GenerateDownloadFileUrl("resourceId").spec());
+ EXPECT_EQ(
+ "https://www.example.com/drive/v2/files/file%3AresourceId?alt=media",
+ url_generator_.GenerateDownloadFileUrl("file:resourceId").spec());
}
TEST_F(DriveApiUrlGeneratorTest, GeneratePermissionsInsertUrl) {
« no previous file with comments | « google_apis/drive/drive_api_url_generator.cc ('k') | google_apis/drive/files_list_request_runner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698