summaryrefslogtreecommitdiffstats
path: root/chrome/tools
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-08 19:56:14 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-08 19:56:14 +0000
commita771dc3feb97ae20170cf5617ba48d6340549698 (patch)
tree2482dd2533a3341ede166407b6eb3761a28ec4e7 /chrome/tools
parent0f786468a0c44da5093c6759915e1c0384535adf (diff)
downloadchromium_src-a771dc3feb97ae20170cf5617ba48d6340549698.zip
chromium_src-a771dc3feb97ae20170cf5617ba48d6340549698.tar.gz
chromium_src-a771dc3feb97ae20170cf5617ba48d6340549698.tar.bz2
Revert 74118 - Remove wstring from RVH's run Javascript command.
BUG=23581 TEST=no visible changes; all tests pass Review URL: http://codereview.chromium.org/6312154 TBR=avi@chromium.org Review URL: http://codereview.chromium.org/6459002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74158 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/tools')
-rw-r--r--chrome/tools/convert_dict/convert_dict_unittest.cc31
1 files changed, 14 insertions, 17 deletions
diff --git a/chrome/tools/convert_dict/convert_dict_unittest.cc b/chrome/tools/convert_dict/convert_dict_unittest.cc
index f8d1971..5f56c69 100644
--- a/chrome/tools/convert_dict/convert_dict_unittest.cc
+++ b/chrome/tools/convert_dict/convert_dict_unittest.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 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 @@ bool VerifyWords(const convert_dict::DicReader::WordList& org_words,
// * Creates bdict data.
// * Verify the bdict data.
void RunDictionaryTest(const char* codepage,
- const std::map<string16, bool>& word_list) {
+ const std::map<std::wstring, 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<string16, bool>::const_iterator it = word_list.begin();
+ for (std::map<std::wstring, bool>::const_iterator it = word_list.begin();
it != word_list.end(); ++it) {
std::string encoded_word;
- EXPECT_TRUE(UTF16ToCodepage(it->first,
- codepage,
- base::OnStringConversionError::FAIL,
- &encoded_word));
+ EXPECT_TRUE(WideToCodepage(it->first,
+ codepage,
+ base::OnStringConversionError::FAIL,
+ &encoded_word));
dic_data += encoded_word;
dic_data += "\n";
}
@@ -101,7 +101,7 @@ void RunDictionaryTest(const char* codepage,
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()));
- string16 word(UTF8ToUTF16(dic_reader.words()[i].first));
+ std::wstring word(UTF8ToWide(dic_reader.words()[i].first));
EXPECT_TRUE(word_list.find(word) != word_list.end());
}
@@ -149,10 +149,9 @@ TEST(ConvertDictTest, English) {
L"they",
};
- std::map<string16, bool> word_list;
+ std::map<std::wstring, bool> word_list;
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kWords); ++i)
- word_list.insert(std::make_pair<string16, bool>(WideToUTF16(kWords[i]),
- true));
+ word_list.insert(std::make_pair<std::wstring, bool>(kWords[i], true));
RunDictionaryTest(kCodepage, word_list);
}
@@ -171,10 +170,9 @@ TEST(ConvertDictTest, Russian) {
L"\x043e\x043d\x0438",
};
- std::map<string16, bool> word_list;
+ std::map<std::wstring, bool> word_list;
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kWords); ++i)
- word_list.insert(std::make_pair<string16, bool>(WideToUTF16(kWords[i]),
- true));
+ word_list.insert(std::make_pair<std::wstring, bool>(kWords[i], true));
RunDictionaryTest(kCodepage, word_list);
}
@@ -195,10 +193,9 @@ TEST(ConvertDictTest, Hungarian) {
L"\x006d\x0061\x0067\x0075\x006b",
};
- std::map<string16, bool> word_list;
+ std::map<std::wstring, bool> word_list;
for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kWords); ++i)
- word_list.insert(std::make_pair<string16, bool>(WideToUTF16(kWords[i]),
- true));
+ word_list.insert(std::make_pair<std::wstring, bool>(kWords[i], true));
RunDictionaryTest(kCodepage, word_list);
}