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

Unified Diff: views/view_unittest.cc

Issue 8373016: views: Change the remaining std::wstring entries to string16. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 2 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 | « views/view_text_utils.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/view_unittest.cc
diff --git a/views/view_unittest.cc b/views/view_unittest.cc
index ba6579d530472262bf69f4814b120b5b7074ec59..d702e95af703de5b92dcbeb4603e24a61ef8cfc0 100644
--- a/views/view_unittest.cc
+++ b/views/view_unittest.cc
@@ -850,9 +850,9 @@ TEST_F(ViewTest, Textfield) {
// Tests that the Textfield view respond appropiately to cut/copy/paste.
TEST_F(ViewTest, TextfieldCutCopyPaste) {
- const std::wstring kNormalText = L"Normal";
- const std::wstring kReadOnlyText = L"Read only";
- const std::wstring kPasswordText = L"Password! ** Secret stuff **";
+ const string16 kNormalText = ASCIIToUTF16("Normal");
+ const string16 kReadOnlyText = ASCIIToUTF16("Read only");
+ const string16 kPasswordText = ASCIIToUTF16("Password! ** Secret stuff **");
ui::Clipboard clipboard;
@@ -941,12 +941,12 @@ TEST_F(ViewTest, TextfieldCutCopyPaste) {
::SendMessage(read_only->GetTestingHandle(), WM_KEYDOWN, 0, 0);
wchar_t buffer[1024] = { 0 };
::GetWindowText(read_only->GetTestingHandle(), buffer, 1024);
- EXPECT_EQ(kReadOnlyText, std::wstring(buffer));
+ EXPECT_EQ(kReadOnlyText, string16(buffer));
sky 2011/10/24 14:56:08 I believe these should rename wstring since buffer
tfarina 2011/10/24 15:19:42 On Windows string16 is typedefed to std::wstring.
password->SelectAll();
::SendMessage(password->GetTestingHandle(), WM_PASTE, 0, 0);
::GetWindowText(password->GetTestingHandle(), buffer, 1024);
- EXPECT_EQ(kNormalText, std::wstring(buffer));
+ EXPECT_EQ(kNormalText, string16(buffer));
// Copy from read_only so the string we are pasting is not the same as the
// current one.
@@ -955,7 +955,7 @@ TEST_F(ViewTest, TextfieldCutCopyPaste) {
normal->SelectAll();
::SendMessage(normal->GetTestingHandle(), WM_PASTE, 0, 0);
::GetWindowText(normal->GetTestingHandle(), buffer, 1024);
- EXPECT_EQ(kReadOnlyText, std::wstring(buffer));
+ EXPECT_EQ(kReadOnlyText, string16(buffer));
widget->CloseNow();
}
#endif
« no previous file with comments | « views/view_text_utils.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698