diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-07 00:33:23 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-11-07 00:33:23 +0000 |
commit | c7b982176e711f0882a08b683c9d1496072d271a (patch) | |
tree | e4e4c7c9d3f66507054db8d99d3a5386796bee67 /chrome_frame/test | |
parent | 3baef3bd25801d51d8b66ca21f5e8704d1380b31 (diff) | |
download | chromium_src-c7b982176e711f0882a08b683c9d1496072d271a.zip chromium_src-c7b982176e711f0882a08b683c9d1496072d271a.tar.gz chromium_src-c7b982176e711f0882a08b683c9d1496072d271a.tar.bz2 |
Eliminate icu_stubs. Things still seem to link fine without these. I suspect splitting utf_string_conversions out of string_utils on the Chrome side helped here.
If I don't eliminate these, I need to patch them for bug 4010, but I'm not going to do that if they aren't needed.
BUG=4010
TEST=none
Review URL: http://codereview.chromium.org/371039
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31343 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/test')
-rw-r--r-- | chrome_frame/test/icu_stubs_unittests.cc | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/chrome_frame/test/icu_stubs_unittests.cc b/chrome_frame/test/icu_stubs_unittests.cc deleted file mode 100644 index 4da4a40..0000000 --- a/chrome_frame/test/icu_stubs_unittests.cc +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright (c) 2006-2009 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. - -#include "chrome_frame/test/chrome_frame_unittests.h" - -// Need to include these first since they're included -#include "base/logging.h" -#include "base/string_util.h" -#include "googleurl/src/url_canon.h" - -// Include the implementation of our stubs into a special namespace so that -// we can separate them from Chrome's implementation. -namespace icu_stubs { - // This struct is only to avoid build problems for the two googleurl stubs - // that currently are noops. - struct CanonOutputW { }; - - #include "chrome_frame/icu_stubs.cc" -} // namespace icu_stubs - -// anonymous namespace for test data. -namespace { - - // Test strings borrowed from base/string_util_unittest.cc - static const wchar_t* const kConvertRoundtripCases[] = { - L"", - L"Google Vid¯ôfY »" - L"\x7f51\x9875\x0020\x56fe\x7247\x0020\x8d44\x8baf\x66f4\x591a\x0020\x00bb", - // " ±³ºÌü¹¿Â ÃÄÌÂ" - L"\x03a0\x03b1\x03b3\x03ba\x03cc\x03c3\x03bc\x03b9" - L"\x03bf\x03c2\x0020\x0399\x03c3\x03c4\x03cc\x03c2", - // ">8A: AB@0=8F =0 @CAA:><" - L"\x041f\x043e\x0438\x0441\x043a\x0020\x0441\x0442" - L"\x0440\x0430\x043d\x0438\x0446\x0020\x043d\x0430" - L"\x0020\x0440\x0443\x0441\x0441\x043a\x043e\x043c", - // "È´ÌÁD¾¤Â" - L"\xc804\xccb4\xc11c\xbe44\xc2a4", - - // Test characters that take more than 16 bits. This will depend on whether - // wchar_t is 16 or 32 bits. - #if defined(WCHAR_T_IS_UTF16) - L"\xd800\xdf00", - // ????? (Mathematical Alphanumeric Symbols (U+011d40 - U+011d44 : A,B,C,D,E) - L"\xd807\xdd40\xd807\xdd41\xd807\xdd42\xd807\xdd43\xd807\xdd44", - #elif defined(WCHAR_T_IS_UTF32) - L"\x10300", - // ????? (Mathematical Alphanumeric Symbols (U+011d40 - U+011d44 : A,B,C,D,E) - L"\x11d40\x11d41\x11d42\x11d43\x11d44", - #endif - }; - -} // namespace - -TEST(IcuStubsTests, UTF8AndWideStubTest) { - // Test code borrowed from ConvertUTF8AndWide in base/string_util_unittest.cc. - - // The difference is that we want to make sure that our stubs work the same - // way as chrome's implementation of WideToUTF8 and UTF8ToWide. - for (size_t i = 0; i < arraysize(kConvertRoundtripCases); ++i) { - std::ostringstream utf8_base, utf8_stub; - utf8_base << WideToUTF8(kConvertRoundtripCases[i]); - utf8_stub << icu_stubs::WideToUTF8(kConvertRoundtripCases[i]); - - EXPECT_EQ(utf8_base.str(), utf8_stub.str()); - - std::wostringstream wide_base, wide_stub; - wide_base << UTF8ToWide(utf8_base.str()); - wide_stub << icu_stubs::UTF8ToWide(utf8_base.str()); - - EXPECT_EQ(wide_base.str(), wide_stub.str()); - } -} |