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 "platform/LayoutLocale.h" |
| 6 |
| 7 #include "platform/Logging.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 TEST(LayoutLocaleTest, Get) |
| 13 { |
| 14 LayoutLocale::clearForTesting(); |
| 15 |
| 16 EXPECT_EQ(nullptr, LayoutLocale::get(nullAtom)); |
| 17 |
| 18 EXPECT_EQ(emptyAtom, LayoutLocale::get(emptyAtom)->localeString()); |
| 19 |
| 20 EXPECT_TRUE(equalIgnoringCase("en-us", LayoutLocale::get("en-us")->localeStr
ing())); |
| 21 EXPECT_TRUE(equalIgnoringCase("ja-jp", LayoutLocale::get("ja-jp")->localeStr
ing())); |
| 22 |
| 23 LayoutLocale::clearForTesting(); |
| 24 } |
| 25 |
| 26 TEST(LayoutLocaleTest, GetCaseInsensitive) |
| 27 { |
| 28 const LayoutLocale* enUS = LayoutLocale::get("en-us"); |
| 29 EXPECT_EQ(enUS, LayoutLocale::get("en-US")); |
| 30 } |
| 31 |
| 32 } // namespace blink |
OLD | NEW |