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 571a661a6e9bb2000ba68d832022c5b724b03e46..de806990457a328c1de0f8ececc5ba530c646cbf 100644 |
--- a/chrome/browser/google_apis/gdata_wapi_url_generator_unittest.cc |
+++ b/chrome/browser/google_apis/gdata_wapi_url_generator_unittest.cc |
@@ -32,29 +32,29 @@ 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( |
- GURL("http://www.example.com"), |
- 100, // num_items_to_fetch |
- 0, // changestamp |
- "" // search_string |
- ).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", |
- GDataWapiUrlGenerator::AddFeedUrlParams( |
- GURL("http://www.example.com"), |
- 100, // num_items_to_fetch |
- 123, // changestamp |
- "" // search_string |
- ).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", |
+ GDataWapiUrlGenerator::AddFeedUrlParams(GURL("http://www.example.com"), |
+ 100, // num_items_to_fetch |
+ 0, // changestamp |
+ std::string() // search_string |
+ ).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", |
+ GDataWapiUrlGenerator::AddFeedUrlParams(GURL("http://www.example.com"), |
+ 100, // num_items_to_fetch |
+ 123, // changestamp |
+ std::string() // search_string |
+ ).spec()); |
EXPECT_EQ("http://www.example.com/?v=3&alt=json&showroot=true&" |
"showfolders=true" |
"&include-shared=true" |
@@ -72,53 +72,52 @@ TEST_F(GDataWapiUrlGeneratorTest, AddFeedUrlParams) { |
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&include-shared=true" |
- "&max-results=500&include-installed-apps=true", |
- url_generator_.GenerateResourceListUrl(GURL(), // override_url, |
- 0, // start_changestamp, |
- "", // search_string, |
- "" // directory resource ID |
- ).spec()); |
+ EXPECT_EQ("https://docs.google.com/feeds/default/private/full" |
+ "?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, |
+ std::string(), // search_string, |
+ std::string() // directory resource ID |
+ ).spec()); |
// With an override URL provided, the base URL is changed, but the default |
// parameters remain as-is. |
- EXPECT_EQ( |
- "http://localhost/" |
- "?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, |
- "", // search_string, |
- "" // directory resource ID |
- ).spec()); |
+ EXPECT_EQ("http://localhost/" |
+ "?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, |
+ std::string(), // search_string, |
+ std::string() // directory resource ID |
+ ).spec()); |
// With a non-zero start_changestamp provided, the base URL is changed from |
// "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&include-shared=true" |
- "&max-results=500&include-installed-apps=true" |
- "&start-index=100", |
- url_generator_.GenerateResourceListUrl(GURL(), // override_url, |
- 100, // start_changestamp, |
- "", // search_string, |
- "" // directory resource ID |
- ).spec()); |
+ EXPECT_EQ("https://docs.google.com/feeds/default/private/changes" |
+ "?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, |
+ std::string(), // search_string, |
+ std::string() // directory resource ID |
+ ).spec()); |
// With a non-empty search string provided, "max-results" value is changed, |
// and "q" parameter is added. |
- EXPECT_EQ( |
- "https://docs.google.com/feeds/default/private/full" |
- "?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, |
- "" // directory resource ID |
- ).spec()); |
+ EXPECT_EQ("https://docs.google.com/feeds/default/private/full" |
+ "?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, |
+ std::string() // directory resource ID |
+ ).spec()); |
// With a non-empty directory resource ID provided, the base URL is |
// changed, but the default parameters remain. |
@@ -127,24 +126,23 @@ TEST_F(GDataWapiUrlGeneratorTest, GenerateResourceListUrl) { |
"?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, |
+ 0, // start_changestamp, |
+ std::string(), // search_string, |
"XXX" // directory resource ID |
).spec()); |
// With a non-empty override_url provided, the base URL is changed, but |
// the default parameters remain. Note that start-index should not be |
// overridden. |
- EXPECT_EQ( |
- "http://example.com/" |
- "?start-index=123&v=3&alt=json&showroot=true&showfolders=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, |
- "", // search_string, |
- "XXX" // directory resource ID |
- ).spec()); |
+ EXPECT_EQ("http://example.com/" |
+ "?start-index=123&v=3&alt=json&showroot=true&showfolders=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, |
+ std::string(), // search_string, |
+ "XXX" // directory resource ID |
+ ).spec()); |
} |
TEST_F(GDataWapiUrlGeneratorTest, GenerateEditUrl) { |