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

Side by Side Diff: chrome/browser/search_engines/template_url_parser_unittest.cc

Issue 120983002: Update some uses of UTF conversions in chrome/browser to use the base:: namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 12 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/file_util.h" 5 #include "base/file_util.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/path_service.h" 7 #include "base/path_service.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "chrome/browser/search_engines/template_url.h" 9 #include "chrome/browser/search_engines/template_url.h"
10 #include "chrome/browser/search_engines/template_url_parser.h" 10 #include "chrome/browser/search_engines/template_url_parser.h"
11 #include "chrome/common/chrome_paths.h" 11 #include "chrome/common/chrome_paths.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
13 13
14 using base::ASCIIToUTF16;
15
14 // ParamFilterImpl ------------------------------------------------------------ 16 // ParamFilterImpl ------------------------------------------------------------
15 17
16 // Filters any param which as an occurrence of name_str_ in its name or an 18 // Filters any param which as an occurrence of name_str_ in its name or an
17 // occurrence of value_str_ in its value. 19 // occurrence of value_str_ in its value.
18 class ParamFilterImpl : public TemplateURLParser::ParameterFilter { 20 class ParamFilterImpl : public TemplateURLParser::ParameterFilter {
19 public: 21 public:
20 ParamFilterImpl(std::string name_str, std::string value_str); 22 ParamFilterImpl(std::string name_str, std::string value_str);
21 virtual ~ParamFilterImpl(); 23 virtual ~ParamFilterImpl();
22 24
23 virtual bool KeepParameter(const std::string& key, 25 virtual bool KeepParameter(const std::string& key,
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 EXPECT_EQ(ASCIIToUTF16("Yahoo"), template_url_->short_name()); 252 EXPECT_EQ(ASCIIToUTF16("Yahoo"), template_url_->short_name());
251 EXPECT_TRUE(template_url_->url_ref().SupportsReplacement()); 253 EXPECT_TRUE(template_url_->url_ref().SupportsReplacement());
252 EXPECT_TRUE(template_url_->suggestions_url().empty()); 254 EXPECT_TRUE(template_url_->suggestions_url().empty());
253 EXPECT_EQ("http://search.yahoo.com/search?p={searchTerms}&ei=UTF-8", 255 EXPECT_EQ("http://search.yahoo.com/search?p={searchTerms}&ei=UTF-8",
254 template_url_->url()); 256 template_url_->url());
255 ASSERT_EQ(1U, template_url_->input_encodings().size()); 257 ASSERT_EQ(1U, template_url_->input_encodings().size());
256 EXPECT_EQ("UTF-8", template_url_->input_encodings()[0]); 258 EXPECT_EQ("UTF-8", template_url_->input_encodings()[0]);
257 EXPECT_EQ(GURL("http://search.yahoo.com/favicon.ico"), 259 EXPECT_EQ(GURL("http://search.yahoo.com/favicon.ico"),
258 template_url_->favicon_url()); 260 template_url_->favicon_url());
259 } 261 }
OLDNEW
« no previous file with comments | « chrome/browser/search_engines/template_url_parser.cc ('k') | chrome/browser/search_engines/template_url_prepopulate_data.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698