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

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

Issue 126052: Fixes bug where keyword editor would end up prefixing all keyword urls... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 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/search_provider.cc ('k') | chrome/browser/browser_init.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autocomplete/search_provider_unittest.cc
===================================================================
--- chrome/browser/autocomplete/search_provider_unittest.cc (revision 18266)
+++ chrome/browser/autocomplete/search_provider_unittest.cc (working copy)
@@ -98,8 +98,8 @@
// Add url1, with search term term1_.
HistoryService* history =
profile_.GetHistoryService(Profile::EXPLICIT_ACCESS);
- term1_url_ = default_t_url_->url()->ReplaceSearchTerms(
- *default_t_url_, term1_, 0, std::wstring());
+ term1_url_ = GURL(WideToUTF8(default_t_url_->url()->ReplaceSearchTerms(
+ *default_t_url_, term1_, 0, std::wstring())));
history->AddPageWithDetails(term1_url_, std::wstring(), 1, 1,
base::Time::Now(), false);
history->SetKeywordSearchTermsForURL(term1_url_, default_t_url_->id(),
@@ -115,8 +115,8 @@
ASSERT_NE(0, keyword_t_url_->id());
// Add a page and search term for keyword_t_url_.
- keyword_url_ = keyword_t_url_->url()->ReplaceSearchTerms(
- *keyword_t_url_, keyword_term_, 0, std::wstring());
+ keyword_url_ = GURL(WideToUTF8(keyword_t_url_->url()->ReplaceSearchTerms(
+ *keyword_t_url_, keyword_term_, 0, std::wstring())));
history->AddPageWithDetails(keyword_url_, std::wstring(), 1, 1,
base::Time::Now(), false);
history->SetKeywordSearchTermsForURL(keyword_url_, keyword_t_url_->id(),
@@ -189,8 +189,8 @@
ASSERT_TRUE(fetcher);
// And the URL matches what we expected.
- GURL expected_url = default_t_url_->suggestions_url()->ReplaceSearchTerms(
- *default_t_url_, term, 0, std::wstring());
+ GURL expected_url = GURL(WideToUTF8(default_t_url_->suggestions_url()->
+ ReplaceSearchTerms(*default_t_url_, term, 0, std::wstring())));
ASSERT_TRUE(fetcher->original_url() == expected_url);
// Tell the SearchProvider the suggest query is done.
@@ -231,8 +231,8 @@
ASSERT_TRUE(keyword_fetcher);
// And the URL matches what we expected.
- GURL expected_url = keyword_t_url_->suggestions_url()->ReplaceSearchTerms(
- *keyword_t_url_, term, 0, std::wstring());
+ GURL expected_url = GURL(WideToUTF8(keyword_t_url_->suggestions_url()->
+ ReplaceSearchTerms(*keyword_t_url_, term, 0, std::wstring())));
ASSERT_TRUE(keyword_fetcher->original_url() == expected_url);
// Tell the SearchProvider the keyword suggest query is done.
« no previous file with comments | « chrome/browser/autocomplete/search_provider.cc ('k') | chrome/browser/browser_init.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698