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

Unified Diff: chrome/browser/autocomplete/autocomplete_popup_view_gtk_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/autocomplete_popup_view_gtk_unittest.cc
===================================================================
--- chrome/browser/autocomplete/autocomplete_popup_view_gtk_unittest.cc (revision 72388)
+++ chrome/browser/autocomplete/autocomplete_popup_view_gtk_unittest.cc (working copy)
@@ -6,6 +6,7 @@
#include <gtk/gtk.h>
+#include "base/utf_string_conversions.h"
#include "chrome/browser/autocomplete/autocomplete.h"
#include "chrome/browser/autocomplete/autocomplete_match.h"
#include "chrome/browser/ui/gtk/gtk_util.h"
@@ -44,7 +45,7 @@
// friend of the class being tested. This method just proxies the
// call through after adding the fixture's layout_.
void SetupLayoutForMatch(
- const std::wstring& text,
+ const string16& text,
const AutocompleteMatch::ACMatchClassifications& classifications,
const GdkColor* base_color,
const GdkColor* dim_color,
@@ -188,7 +189,7 @@
// text matches the input string, with the passed-in color, and
// nothing bolded.
TEST_F(AutocompletePopupViewGtkTest, DecorateMatchedStringNoMatch) {
- const std::wstring kContents = L"This is a test";
+ const string16 kContents = ASCIIToUTF16("This is a test");
AutocompleteMatch::ACMatchClassifications classifications;
@@ -224,7 +225,7 @@
// Identical to DecorateMatchedStringNoMatch, except test that URL
// style gets a different color than we passed in.
TEST_F(AutocompletePopupViewGtkTest, DecorateMatchedStringURLNoMatch) {
- const std::wstring kContents = L"This is a test";
+ const string16 kContents = ASCIIToUTF16("This is a test");
AutocompleteMatch::ACMatchClassifications classifications;
classifications.push_back(
@@ -260,7 +261,7 @@
// Test that DIM works as expected.
TEST_F(AutocompletePopupViewGtkTest, DecorateMatchedStringDimNoMatch) {
- const std::wstring kContents = L"This is a test";
+ const string16 kContents = ASCIIToUTF16("This is a test");
// Dim "is".
const guint runLength1 = 5, runLength2 = 2, runLength3 = 7;
// Make sure nobody messed up the inputs.
@@ -322,7 +323,7 @@
// Test that the matched run gets bold-faced, but keeps the same
// color.
TEST_F(AutocompletePopupViewGtkTest, DecorateMatchedStringMatch) {
- const std::wstring kContents = L"This is a test";
+ const string16 kContents = ASCIIToUTF16("This is a test");
// Match "is".
const guint runLength1 = 5, runLength2 = 2, runLength3 = 7;
// Make sure nobody messed up the inputs.
@@ -380,7 +381,7 @@
// Just like DecorateMatchedStringURLMatch, this time with URL style.
TEST_F(AutocompletePopupViewGtkTest, DecorateMatchedStringURLMatch) {
- const std::wstring kContents = L"http://hello.world/";
+ const string16 kContents = ASCIIToUTF16("http://hello.world/");
// Match "hello".
const guint runLength1 = 7, runLength2 = 5, runLength3 = 7;
// Make sure nobody messed up the inputs.

Powered by Google App Engine
This is Rietveld 408576698