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

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

Issue 12412020: drive: Include "include-shared=true" for including shared resources in feeds. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 7 years, 9 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/gdata_wapi_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/gdata_wapi_url_generator_unittest.cc
diff --git a/chrome/browser/google_apis/gdata_wapi_url_generator_unittest.cc b/chrome/browser/google_apis/gdata_wapi_url_generator_unittest.cc
index bdd8b20c785962f59d3aa84d36a2a010ed0d1071..1fc0c1ec10c800eb897078a5acf210186d5a1474 100644
--- a/chrome/browser/google_apis/gdata_wapi_url_generator_unittest.cc
+++ b/chrome/browser/google_apis/gdata_wapi_url_generator_unittest.cc
@@ -34,6 +34,7 @@ TEST_F(GDataWapiUrlGeneratorTest, AddInitiateUploadUrlParams) {
TEST_F(GDataWapiUrlGeneratorTest, AddFeedUrlParams) {
EXPECT_EQ("http://www.example.com/?v=3&alt=json&showroot=true&"
"showfolders=true"
+ "&include-shared=true"
"&max-results=100"
"&include-installed-apps=true",
GDataWapiUrlGenerator::AddFeedUrlParams(
@@ -44,6 +45,7 @@ TEST_F(GDataWapiUrlGeneratorTest, AddFeedUrlParams) {
).spec());
EXPECT_EQ("http://www.example.com/?v=3&alt=json&showroot=true&"
"showfolders=true"
+ "&include-shared=true"
"&max-results=100"
"&include-installed-apps=true"
"&start-index=123",
@@ -55,6 +57,7 @@ TEST_F(GDataWapiUrlGeneratorTest, AddFeedUrlParams) {
).spec());
EXPECT_EQ("http://www.example.com/?v=3&alt=json&showroot=true&"
"showfolders=true"
+ "&include-shared=true"
"&max-results=100"
"&include-installed-apps=true"
"&start-index=123"
@@ -71,8 +74,8 @@ TEST_F(GDataWapiUrlGeneratorTest, GenerateResourceListUrl) {
// This is the very basic URL for the GetResourceList operation.
EXPECT_EQ(
"https://docs.google.com/feeds/default/private/full"
- "?v=3&alt=json&showroot=true&showfolders=true&max-results=500"
- "&include-installed-apps=true",
+ "?v=3&alt=json&showroot=true&showfolders=true&include-shared=true"
+ "&max-results=500&include-installed-apps=true",
url_generator_.GenerateResourceListUrl(GURL(), // override_url,
0, // start_changestamp,
"", // search_string,
@@ -84,8 +87,8 @@ TEST_F(GDataWapiUrlGeneratorTest, GenerateResourceListUrl) {
// parameters remain as-is.
EXPECT_EQ(
"http://localhost/"
- "?v=3&alt=json&showroot=true&showfolders=true&max-results=500"
- "&include-installed-apps=true",
+ "?v=3&alt=json&showroot=true&showfolders=true&include-shared=true"
+ "&max-results=500&include-installed-apps=true",
url_generator_.GenerateResourceListUrl(
GURL("http://localhost/"), // override_url,
0, // start_changestamp,
@@ -98,8 +101,8 @@ TEST_F(GDataWapiUrlGeneratorTest, GenerateResourceListUrl) {
// "full" to "changes", and "start-index" parameter is added.
EXPECT_EQ(
"https://docs.google.com/feeds/default/private/changes"
- "?v=3&alt=json&showroot=true&showfolders=true&max-results=500"
- "&include-installed-apps=true"
+ "?v=3&alt=json&showroot=true&showfolders=true&include-shared=true"
+ "&max-results=500&include-installed-apps=true"
"&start-index=100",
url_generator_.GenerateResourceListUrl(GURL(), // override_url,
100, // start_changestamp,
@@ -112,8 +115,8 @@ TEST_F(GDataWapiUrlGeneratorTest, GenerateResourceListUrl) {
// and "q" parameter is added.
EXPECT_EQ(
"https://docs.google.com/feeds/default/private/full"
- "?v=3&alt=json&showroot=true&showfolders=true&max-results=50"
- "&include-installed-apps=true&q=foo",
+ "?v=3&alt=json&showroot=true&showfolders=true&include-shared=true"
+ "&max-results=50&include-installed-apps=true&q=foo",
url_generator_.GenerateResourceListUrl(GURL(), // override_url,
0, // start_changestamp,
"foo", // search_string,
@@ -125,8 +128,8 @@ TEST_F(GDataWapiUrlGeneratorTest, GenerateResourceListUrl) {
// the default parameters remain.
EXPECT_EQ(
"https://docs.google.com/feeds/default/private/full/-/shared-with-me"
- "?v=3&alt=json&showroot=true&showfolders=true&max-results=500"
- "&include-installed-apps=true",
+ "?v=3&alt=json&showroot=true&showfolders=true&include-shared=true"
+ "&max-results=500&include-installed-apps=true",
url_generator_.GenerateResourceListUrl(GURL(), // override_url,
0, // start_changestamp,
"", // search_string,
@@ -138,8 +141,8 @@ TEST_F(GDataWapiUrlGeneratorTest, GenerateResourceListUrl) {
// changed, but the default parameters remain.
EXPECT_EQ(
"https://docs.google.com/feeds/default/private/full/XXX/contents"
- "?v=3&alt=json&showroot=true&showfolders=true&max-results=500"
- "&include-installed-apps=true",
+ "?v=3&alt=json&showroot=true&showfolders=true&include-shared=true"
+ "&max-results=500&include-installed-apps=true",
url_generator_.GenerateResourceListUrl(GURL(), // override_url,
0, // start_changestamp,
"", // search_string,
@@ -153,7 +156,7 @@ TEST_F(GDataWapiUrlGeneratorTest, GenerateResourceListUrl) {
EXPECT_EQ(
"http://example.com/"
"?start-index=123&v=3&alt=json&showroot=true&showfolders=true"
- "&max-results=500&include-installed-apps=true",
+ "&include-shared=true&max-results=500&include-installed-apps=true",
url_generator_.GenerateResourceListUrl(
GURL("http://example.com/?start-index=123"), // override_url,
100, // start_changestamp,
« no previous file with comments | « chrome/browser/google_apis/gdata_wapi_url_generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698