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

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

Issue 6306011: Remove wstring from autocomplete. (Closed) Base URL: svn://chrome-svn/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
Index: chrome/browser/autocomplete/history_quick_provider_unittest.cc
===================================================================
--- chrome/browser/autocomplete/history_quick_provider_unittest.cc (revision 72388)
+++ chrome/browser/autocomplete/history_quick_provider_unittest.cc (working copy)
@@ -96,7 +96,7 @@
// Runs an autocomplete query on |text| and checks to see that the returned
// results' destination URLs match those provided. |expected_urls| does not
// need to be in sorted order.
- void RunTest(const std::wstring text,
+ void RunTest(const string16 text,
std::vector<std::string> expected_urls,
std::string expected_top_result);
@@ -163,13 +163,13 @@
std::set<std::string> matches_;
};
-void HistoryQuickProviderTest::RunTest(const std::wstring text,
+void HistoryQuickProviderTest::RunTest(const string16 text,
std::vector<std::string> expected_urls,
std::string expected_top_result) {
std::sort(expected_urls.begin(), expected_urls.end());
MessageLoop::current()->RunAllPending();
- AutocompleteInput input(text, std::wstring(), false, false, true, false);
+ AutocompleteInput input(text, string16(), false, false, true, false);
provider_->Start(input, false);
EXPECT_TRUE(provider_->done());
@@ -194,7 +194,7 @@
}
TEST_F(HistoryQuickProviderTest, SimpleSingleMatch) {
- std::wstring text(L"slashdot");
+ string16 text(ASCIIToUTF16("slashdot"));
std::string expected_url("http://slashdot.org/favorite_page.html");
std::vector<std::string> expected_urls;
expected_urls.push_back(expected_url);
@@ -202,7 +202,7 @@
}
TEST_F(HistoryQuickProviderTest, MultiMatch) {
- std::wstring text(L"foo");
+ string16 text(ASCIIToUTF16("foo"));
std::vector<std::string> expected_urls;
expected_urls.push_back("http://foo.com/");
expected_urls.push_back("http://foo.com/dir/");
@@ -214,7 +214,7 @@
}
TEST_F(HistoryQuickProviderTest, StartRelativeMatch) {
- std::wstring text(L"xyz");
+ string16 text(ASCIIToUTF16("xyz"));
std::vector<std::string> expected_urls;
expected_urls.push_back("http://xyzabcdefghijklmnopqrstuvw.com/a");
expected_urls.push_back("http://abcxyzdefghijklmnopqrstuvw.com/a");
@@ -225,7 +225,7 @@
}
TEST_F(HistoryQuickProviderTest, RecencyMatch) {
- std::wstring text(L"startest");
+ string16 text(ASCIIToUTF16("startest"));
std::vector<std::string> expected_urls;
expected_urls.push_back("http://startest.com/y/a");
expected_urls.push_back("http://startest.com/y/b");

Powered by Google App Engine
This is Rietveld 408576698