summaryrefslogtreecommitdiffstats
path: root/chrome/browser/autocomplete/autocomplete_unittest.cc
diff options
context:
space:
mode:
authorpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-10 23:52:43 +0000
committerpkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-12-10 23:52:43 +0000
commite7a5b787751ed3c1c31f66ae919f11911393b974 (patch)
tree7627eb287c3e079a240f6cc8f98cf94c36a568b4 /chrome/browser/autocomplete/autocomplete_unittest.cc
parent01b9961c2ee639c10b07624d40a73702a9f3d0ec (diff)
downloadchromium_src-e7a5b787751ed3c1c31f66ae919f11911393b974.zip
chromium_src-e7a5b787751ed3c1c31f66ae919f11911393b974.tar.gz
chromium_src-e7a5b787751ed3c1c31f66ae919f11911393b974.tar.bz2
Make the autocomplete system and various other connected bits of code use GURL instead of wstring where appropriate. Original patch by phajdan.jr@gmail.com, r=me,sky. See http://codereview.chromium.org/13205 .
BUG=715234 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@6758 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/autocomplete/autocomplete_unittest.cc')
-rw-r--r--chrome/browser/autocomplete/autocomplete_unittest.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/chrome/browser/autocomplete/autocomplete_unittest.cc b/chrome/browser/autocomplete/autocomplete_unittest.cc
index a945a5b..9127659 100644
--- a/chrome/browser/autocomplete/autocomplete_unittest.cc
+++ b/chrome/browser/autocomplete/autocomplete_unittest.cc
@@ -4,6 +4,7 @@
#include "base/message_loop.h"
#include "base/ref_counted.h"
+#include "base/string_util.h"
#include "chrome/browser/autocomplete/autocomplete.h"
#include "chrome/common/notification_registrar.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -75,12 +76,12 @@ void TestProvider::AddResults(int start_at, int num) {
wchar_t str[16];
swprintf_s(str, L"%d", i);
match.fill_into_edit = prefix_ + str;
- match.destination_url = match.fill_into_edit;
+ match.destination_url = GURL(WideToUTF8(match.fill_into_edit));
- match.contents = match.destination_url;
+ match.contents = match.fill_into_edit;
match.contents_class.push_back(
ACMatchClassification(0, ACMatchClassification::NONE));
- match.description = match.destination_url;
+ match.description = match.fill_into_edit;
match.description_class.push_back(
ACMatchClassification(0, ACMatchClassification::NONE));
@@ -131,12 +132,13 @@ void AutocompleteProviderTest::ResetController(bool same_destinations) {
providers_.clear();
// Construct two new providers, with either the same or different prefixes.
- TestProvider* providerA = new TestProvider(num_results_per_provider, L"a");
+ TestProvider* providerA = new TestProvider(num_results_per_provider,
+ L"http://a");
providerA->AddRef();
providers_.push_back(providerA);
TestProvider* providerB = new TestProvider(num_results_per_provider * 2,
- same_destinations ? L"a" : L"b");
+ same_destinations ? L"http://a" : L"http://b");
providerB->AddRef();
providers_.push_back(providerB);