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

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

Issue 23514007: Refactor TrashResourceRequest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase Created 7 years, 4 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_url_generator.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_url_generator_unittest.cc
diff --git a/chrome/browser/google_apis/drive_api_url_generator_unittest.cc b/chrome/browser/google_apis/drive_api_url_generator_unittest.cc
index 52da47a968ce0ec01caff91c9a59271a359c6deb..e87710366c0dd3fe0fd3ae7ecf105dc766acc6ec 100644
--- a/chrome/browser/google_apis/drive_api_url_generator_unittest.cc
+++ b/chrome/browser/google_apis/drive_api_url_generator_unittest.cc
@@ -186,6 +186,23 @@ TEST_F(DriveApiUrlGeneratorTest, GetFilesListUrl) {
}
}
+TEST_F(DriveApiUrlGeneratorTest, GetFilesTrashUrl) {
+ // |file_id| should be embedded into the url.
+ EXPECT_EQ("https://www.googleapis.com/drive/v2/files/0ADK06pfg/trash",
+ url_generator_.GetFilesTrashUrl("0ADK06pfg").spec());
+ EXPECT_EQ("https://www.googleapis.com/drive/v2/files/0Bz0bd074/trash",
+ url_generator_.GetFilesTrashUrl("0Bz0bd074").spec());
+ EXPECT_EQ("https://www.googleapis.com/drive/v2/files/file%3Afile_id/trash",
+ url_generator_.GetFilesTrashUrl("file:file_id").spec());
+
+ EXPECT_EQ("http://127.0.0.1:12345/drive/v2/files/0ADK06pfg/trash",
+ test_url_generator_.GetFilesTrashUrl("0ADK06pfg").spec());
+ EXPECT_EQ("http://127.0.0.1:12345/drive/v2/files/0Bz0bd074/trash",
+ test_url_generator_.GetFilesTrashUrl("0Bz0bd074").spec());
+ EXPECT_EQ("http://127.0.0.1:12345/drive/v2/files/file%3Afile_id/trash",
+ test_url_generator_.GetFilesTrashUrl("file:file_id").spec());
+}
+
TEST_F(DriveApiUrlGeneratorTest, GetFileTouchUrl) {
// |file_id| should be embedded into the url.
EXPECT_EQ("https://www.googleapis.com/drive/v2/files/0ADK06pfg"
@@ -328,23 +345,6 @@ TEST_F(DriveApiUrlGeneratorTest, GetChildrenUrlForRemoval) {
"file:folder_id", "file:child_id").spec());
}
-TEST_F(DriveApiUrlGeneratorTest, GetFileTrashUrl) {
- // |file_id| should be embedded into the url.
- EXPECT_EQ("https://www.googleapis.com/drive/v2/files/0ADK06pfg/trash",
- url_generator_.GetFileTrashUrl("0ADK06pfg").spec());
- EXPECT_EQ("https://www.googleapis.com/drive/v2/files/0Bz0bd074/trash",
- url_generator_.GetFileTrashUrl("0Bz0bd074").spec());
- EXPECT_EQ("https://www.googleapis.com/drive/v2/files/file%3Afile_id/trash",
- url_generator_.GetFileTrashUrl("file:file_id").spec());
-
- EXPECT_EQ("http://127.0.0.1:12345/drive/v2/files/0ADK06pfg/trash",
- test_url_generator_.GetFileTrashUrl("0ADK06pfg").spec());
- EXPECT_EQ("http://127.0.0.1:12345/drive/v2/files/0Bz0bd074/trash",
- test_url_generator_.GetFileTrashUrl("0Bz0bd074").spec());
- EXPECT_EQ("http://127.0.0.1:12345/drive/v2/files/file%3Afile_id/trash",
- test_url_generator_.GetFileTrashUrl("file:file_id").spec());
-}
-
TEST_F(DriveApiUrlGeneratorTest, GetInitiateUploadNewFileUrl) {
EXPECT_EQ(
"https://www.googleapis.com/upload/drive/v2/files?uploadType=resumable",
« no previous file with comments | « chrome/browser/google_apis/drive_api_url_generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698