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

Unified Diff: net/base/url_util_unittest.cc

Issue 12069004: google_apis: Move AppendQueryParameter() etc. from common/net/url_util.h to net/base/url_util.h (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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: net/base/url_util_unittest.cc
diff --git a/chrome/common/net/url_util_unittest.cc b/net/base/url_util_unittest.cc
similarity index 80%
copy from chrome/common/net/url_util_unittest.cc
copy to net/base/url_util_unittest.cc
index 1d7fdda7d478ffd09399120e1f5dd1299d41b5be..13f6e38bdc4e42b2d2fd46ddcd9b52abe5c51590 100644
--- a/chrome/common/net/url_util_unittest.cc
+++ b/net/base/url_util_unittest.cc
@@ -1,13 +1,13 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "chrome/common/net/url_util.h"
+#include "net/base/url_util.h"
#include "googleurl/src/gurl.h"
#include "testing/gtest/include/gtest/gtest.h"
-namespace chrome_common_net {
+namespace net {
mmenke 2013/01/28 15:33:37 While you're here, mind adding a nested anonymous
tfarina 2013/01/28 15:55:58 Done.
TEST(UrlUtilTest, AppendQueryParameter) {
// Appending a name-value pair to a URL without a query component.
@@ -80,23 +80,4 @@ TEST(UrlUtilTest, AppendOrReplaceQueryParameter) {
"name", "new").spec());
}
-TEST(BrowserUrlUtilTest, GetValueForKeyInQuery) {
- GURL url("http://example.com/path?name=value&boolParam&"
- "url=http://test.com/q?n1%3Dv1%26n2");
- std::string value;
-
- // False when getting a non-existent query param.
- EXPECT_FALSE(GetValueForKeyInQuery(url, "non-exist", &value));
-
- // True when query param exist.
- EXPECT_TRUE(GetValueForKeyInQuery(url, "name", &value));
- EXPECT_EQ("value", value);
-
- EXPECT_TRUE(GetValueForKeyInQuery(url, "boolParam", &value));
- EXPECT_EQ("", value);
-
- EXPECT_TRUE(GetValueForKeyInQuery(url, "url", &value));
- EXPECT_EQ("http://test.com/q?n1=v1&n2", value);
-}
-
-} // namespace chrome_common_net.
+} // namespace net
« chrome/common/net/url_util.h ('K') | « net/base/url_util.cc ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698