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

Unified Diff: third_party/WebKit/Source/platform/text/HyphenationTest.cpp

Issue 2161683002: Add LayoutLocale class (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Test stability Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/text/HyphenationTest.cpp
diff --git a/third_party/WebKit/Source/platform/text/HyphenationTest.cpp b/third_party/WebKit/Source/platform/text/HyphenationTest.cpp
index 773831709fe6542f23d8328c876124078da63241..dc9db2ab0338fd1db6402e5d2aad22a6dfcfc1f9 100644
--- a/third_party/WebKit/Source/platform/text/HyphenationTest.cpp
+++ b/third_party/WebKit/Source/platform/text/HyphenationTest.cpp
@@ -4,6 +4,7 @@
#include "platform/text/Hyphenation.h"
+#include "platform/LayoutLocale.h"
#include "platform/Logging.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -17,26 +18,16 @@ public:
}
};
-TEST(HyphenationTest, GetHyphenation)
+TEST(HyphenationTest, Get)
{
RefPtr<Hyphenation> hyphenation = adoptRef(new NoHyphenation);
- Hyphenation::setForTesting("en-US", hyphenation);
- EXPECT_EQ(hyphenation.get(), Hyphenation::get("en-US"));
+ LayoutLocale::setHyphenationForTesting("en-US", hyphenation);
+ EXPECT_EQ(hyphenation.get(), LayoutLocale::get("en-US")->getHyphenation());
- Hyphenation::setForTesting("en-UK", nullptr);
- EXPECT_EQ(nullptr, Hyphenation::get("en-UK"));
+ LayoutLocale::setHyphenationForTesting("en-UK", nullptr);
+ EXPECT_EQ(nullptr, LayoutLocale::get("en-UK")->getHyphenation());
- Hyphenation::clearForTesting();
-}
-
-TEST(HyphenationTest, GetHyphenationCaseFolding)
-{
- RefPtr<Hyphenation> hyphenation = adoptRef(new NoHyphenation);
- Hyphenation::setForTesting("en-US", hyphenation);
- EXPECT_EQ(hyphenation, Hyphenation::get("en-US"));
- EXPECT_EQ(hyphenation, Hyphenation::get("en-us"));
-
- Hyphenation::clearForTesting();
+ LayoutLocale::clearForTesting();
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698