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

Unified Diff: chrome/browser/autocomplete/keyword_provider_unittest.cc

Issue 6291003: Revert 71485 - Remove wstring from TemplateURL and friends.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 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
« no previous file with comments | « chrome/browser/autocomplete/keyword_provider.cc ('k') | chrome/browser/autocomplete/search_provider.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/keyword_provider_unittest.cc
===================================================================
--- chrome/browser/autocomplete/keyword_provider_unittest.cc (revision 71499)
+++ chrome/browser/autocomplete/keyword_provider_unittest.cc (working copy)
@@ -1,9 +1,8 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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 "base/message_loop.h"
-#include "base/utf_string_conversions.h"
#include "chrome/browser/autocomplete/autocomplete_match.h"
#include "chrome/browser/autocomplete/keyword_provider.h"
#include "chrome/browser/search_engines/template_url.h"
@@ -38,13 +37,13 @@
void KeywordProviderTest::SetUp() {
static const TemplateURLModel::Initializer kTestKeywordData[] = {
- { "aa", "aa.com?foo=%s", "aa" },
- { "aaaa", "http://aaaa/?aaaa=1&b=%s&c", "aaaa" },
- { "aaaaa", "%s", "aaaaa" },
- { "ab", "bogus URL %s", "ab" },
- { "weasel", "weasel%sweasel", "weasel" },
- { "www", " +%2B?=%sfoo ", "www" },
- { "z", "%s=z", "z" },
+ { L"aa", "aa.com?foo=%s", L"aa" },
+ { L"aaaa", "http://aaaa/?aaaa=1&b=%s&c", L"aaaa" },
+ { L"aaaaa", "%s", L"aaaaa" },
+ { L"ab", "bogus URL %s", L"ab" },
+ { L"weasel", "weasel%sweasel", L"weasel" },
+ { L"www", " +%2B?=%sfoo ", L"www" },
+ { L"z", "%s=z", L"z" },
};
model_.reset(new TemplateURLModel(kTestKeywordData,
@@ -185,17 +184,17 @@
TEST_F(KeywordProviderTest, AddKeyword) {
TemplateURL* template_url = new TemplateURL();
- string16 keyword(ASCIIToUTF16("foo"));
+ std::wstring keyword(L"foo");
std::string url("http://www.google.com/foo?q={searchTerms}");
template_url->SetURL(url, 0, 0);
template_url->set_keyword(keyword);
- template_url->set_short_name(ASCIIToUTF16("Test"));
+ template_url->set_short_name(L"Test");
model_->Add(template_url);
ASSERT_TRUE(template_url == model_->GetTemplateURLForKeyword(keyword));
}
TEST_F(KeywordProviderTest, RemoveKeyword) {
- string16 url(ASCIIToUTF16("http://aaaa/?aaaa=1&b={searchTerms}&c"));
- model_->Remove(model_->GetTemplateURLForKeyword(ASCIIToUTF16("aaaa")));
- ASSERT_TRUE(model_->GetTemplateURLForKeyword(ASCIIToUTF16("aaaa")) == NULL);
+ std::wstring url(L"http://aaaa/?aaaa=1&b={searchTerms}&c");
+ model_->Remove(model_->GetTemplateURLForKeyword(L"aaaa"));
+ ASSERT_TRUE(model_->GetTemplateURLForKeyword(L"aaaa") == NULL);
}
« no previous file with comments | « chrome/browser/autocomplete/keyword_provider.cc ('k') | chrome/browser/autocomplete/search_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698