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

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

Issue 11417108: google_apis: Get rid of gdata_wapi_url_util namespace (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 1 month 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: chrome/browser/google_apis/gdata_wapi_url_generator_unittest.cc
diff --git a/chrome/browser/google_apis/gdata_wapi_url_util_unittest.cc b/chrome/browser/google_apis/gdata_wapi_url_generator_unittest.cc
similarity index 80%
rename from chrome/browser/google_apis/gdata_wapi_url_util_unittest.cc
rename to chrome/browser/google_apis/gdata_wapi_url_generator_unittest.cc
index fa205c0a2959e1be8c4f00d180b76fd9f77264a7..7764bab09c088f9698317ea713c1b5eced910e91 100644
--- a/chrome/browser/google_apis/gdata_wapi_url_util_unittest.cc
+++ b/chrome/browser/google_apis/gdata_wapi_url_generator_unittest.cc
@@ -2,68 +2,68 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/browser/google_apis/gdata_wapi_url_util.h"
+#include "chrome/browser/google_apis/gdata_wapi_url_generator.h"
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace google_apis {
-namespace gdata_wapi_url_util {
-TEST(GDataWapiUrlUtilTest, AddStandardUrlParams) {
+class GDataWapiUrlGeneratorTest : public testing::Test {
+ public:
+ GDataWapiUrlGeneratorTest()
+ : url_generator_(GURL(GDataWapiUrlGenerator::kBaseUrlForProduction)) {
+ }
+
+ protected:
+ GDataWapiUrlGenerator url_generator_;
+};
+
+TEST_F(GDataWapiUrlGeneratorTest, AddStandardUrlParams) {
EXPECT_EQ("http://www.example.com/?v=3&alt=json",
- AddStandardUrlParams(GURL("http://www.example.com")).spec());
+ GDataWapiUrlGenerator::AddStandardUrlParams(
+ GURL("http://www.example.com")).spec());
}
-TEST(GDataWapiUrlUtilTest, AddMetadataUrlParams) {
+TEST_F(GDataWapiUrlGeneratorTest, AddMetadataUrlParams) {
EXPECT_EQ("http://www.example.com/?v=3&alt=json&include-installed-apps=true",
- AddMetadataUrlParams(GURL("http://www.example.com")).spec());
+ GDataWapiUrlGenerator::AddMetadataUrlParams(
+ GURL("http://www.example.com")).spec());
}
-TEST(GDataWapiUrlUtilTest, AddFeedUrlParams) {
+TEST_F(GDataWapiUrlGeneratorTest, AddFeedUrlParams) {
EXPECT_EQ("http://www.example.com/?v=3&alt=json&showfolders=true"
"&max-results=100"
"&include-installed-apps=true",
- AddFeedUrlParams(GURL("http://www.example.com"),
- 100, // num_items_to_fetch
- 0, // changestamp
- "" // search_string
- ).spec());
+ 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&showfolders=true"
"&max-results=100"
"&include-installed-apps=true"
"&start-index=123",
- AddFeedUrlParams(GURL("http://www.example.com"),
- 100, // num_items_to_fetch
- 123, // changestamp
- "" // search_string
- ).spec());
+ 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&showfolders=true"
"&max-results=100"
"&include-installed-apps=true"
"&start-index=123"
"&q=%22foo+bar%22",
- AddFeedUrlParams(GURL("http://www.example.com"),
- 100, // num_items_to_fetch
- 123, // changestamp
- "\"foo bar\"" // search_string
- ).spec());
+ GDataWapiUrlGenerator::AddFeedUrlParams(
+ GURL("http://www.example.com"),
+ 100, // num_items_to_fetch
+ 123, // changestamp
+ "\"foo bar\"" // search_string
+ ).spec());
}
-} // namespace gdata_wapi_url_util
-
-// TODO(satorux): Move the following test code to a separate file
-// gdata_wapi_url_generator_unittest.cc.
-class GDataWapiUrlGeneratorTest : public testing::Test {
- public:
- GDataWapiUrlGeneratorTest()
- : url_generator_(GURL(gdata_wapi_url_util::kBaseUrlForProduction)) {
- }
-
- protected:
- GDataWapiUrlGenerator url_generator_;
-};
-
TEST_F(GDataWapiUrlGeneratorTest, GenerateDocumentListUrl) {
// This is the very basic URL for the GetDocuments operation.
EXPECT_EQ(
« no previous file with comments | « chrome/browser/google_apis/gdata_wapi_url_generator.cc ('k') | chrome/browser/google_apis/gdata_wapi_url_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698