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

Side by Side Diff: third_party/WebKit/Source/platform/LayoutLocaleTest.cpp

Issue 2161683002: Add LayoutLocale class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test stability Created 4 years, 4 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 unified diff | Download patch
OLDNEW
(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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/LayoutLocale.cpp ('k') | third_party/WebKit/Source/platform/blink_platform.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698