Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "base/i18n/character_encoding.h" | |
| 6 | |
| 7 #include "testing/gtest/include/gtest/gtest.h" | |
| 8 | |
| 9 namespace base { | |
| 10 | |
| 11 TEST(CharacterEncodingTest, GetCanonicalEncodingNameByAliasName) { | |
| 12 EXPECT_EQ("Big5", GetCanonicalEncodingNameByAliasName("Big5")); | |
| 13 EXPECT_EQ("windows-874", GetCanonicalEncodingNameByAliasName("windows-874")); | |
| 14 EXPECT_EQ("ISO-8859-8", GetCanonicalEncodingNameByAliasName("ISO-8859-8")); | |
| 15 | |
| 16 // Non-canonical alias names should be converted to a canonical one. | |
| 17 EXPECT_EQ("UTF-8", GetCanonicalEncodingNameByAliasName("utf8")); | |
| 18 EXPECT_EQ("gb18030", GetCanonicalEncodingNameByAliasName("GB18030")); | |
|
jungshik at Google
2016/12/15 18:35:01
While you're at it, you'd better add a couple of m
Jinsuk Kim
2016/12/16 00:03:10
I don't know all the history, but it means this bu
| |
| 19 } | |
| 20 | |
| 21 } // namespace base | |
| OLD | NEW |