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

Unified Diff: chrome/tools/convert_dict/convert_dict_unittest.cc

Issue 6312154: Remove wstring from RVH's run Javascript command.... (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
« chrome/test/webdriver/automation.cc ('K') | « chrome/test/webdriver/automation.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/tools/convert_dict/convert_dict_unittest.cc
===================================================================
--- chrome/tools/convert_dict/convert_dict_unittest.cc (revision 73855)
+++ chrome/tools/convert_dict/convert_dict_unittest.cc (working copy)
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -62,18 +62,18 @@
// * Creates bdict data.
// * Verify the bdict data.
void RunDictionaryTest(const char* codepage,
- const std::map<std::wstring, bool>& word_list) {
+ const std::map<string16, bool>& word_list) {
// Create an affix data and a dictionary data.
std::string aff_data(StringPrintf("SET %s\n", codepage));
std::string dic_data(StringPrintf("%" PRIuS "\n", word_list.size()));
- for (std::map<std::wstring, bool>::const_iterator it = word_list.begin();
+ for (std::map<string16, bool>::const_iterator it = word_list.begin();
it != word_list.end(); ++it) {
std::string encoded_word;
- EXPECT_TRUE(WideToCodepage(it->first,
- codepage,
- base::OnStringConversionError::FAIL,
- &encoded_word));
+ EXPECT_TRUE(UTF16ToCodepage(it->first,
+ codepage,
+ base::OnStringConversionError::FAIL,
+ &encoded_word));
dic_data += encoded_word;
dic_data += "\n";
}
@@ -101,7 +101,7 @@
for (size_t i = 0; i < dic_reader.words().size(); ++i) {
SCOPED_TRACE(StringPrintf("dic_reader.words()[%" PRIuS "]: %s",
i, dic_reader.words()[i].first.c_str()));
- std::wstring word(UTF8ToWide(dic_reader.words()[i].first));
+ string16 word(UTF8ToUTF16(dic_reader.words()[i].first));
EXPECT_TRUE(word_list.find(word) != word_list.end());
}
@@ -149,9 +149,10 @@
L"they",
};
- std::map<std::wstring, bool> word_list;
+ std::map<string16, bool> word_list;
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kWords); ++i)
- word_list.insert(std::make_pair<std::wstring, bool>(kWords[i], true));
+ word_list.insert(std::make_pair<string16, bool>(WideToUTF16(kWords[i]),
+ true));
RunDictionaryTest(kCodepage, word_list);
}
@@ -170,9 +171,10 @@
L"\x043e\x043d\x0438",
};
- std::map<std::wstring, bool> word_list;
+ std::map<string16, bool> word_list;
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kWords); ++i)
- word_list.insert(std::make_pair<std::wstring, bool>(kWords[i], true));
+ word_list.insert(std::make_pair<string16, bool>(WideToUTF16(kWords[i]),
+ true));
RunDictionaryTest(kCodepage, word_list);
}
@@ -193,9 +195,10 @@
L"\x006d\x0061\x0067\x0075\x006b",
};
- std::map<std::wstring, bool> word_list;
+ std::map<string16, bool> word_list;
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kWords); ++i)
- word_list.insert(std::make_pair<std::wstring, bool>(kWords[i], true));
+ word_list.insert(std::make_pair<string16, bool>(WideToUTF16(kWords[i]),
+ true));
RunDictionaryTest(kCodepage, word_list);
}
« chrome/test/webdriver/automation.cc ('K') | « chrome/test/webdriver/automation.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698