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

Unified Diff: Source/platform/fonts/shaping/HarfBuzzShaperTest.cpp

Issue 1239603002: Revert of Change fallback font collection in HarfBuzzShaper (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 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
« no previous file with comments | « Source/platform/fonts/shaping/HarfBuzzShaper.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/shaping/HarfBuzzShaperTest.cpp
diff --git a/Source/platform/fonts/shaping/HarfBuzzShaperTest.cpp b/Source/platform/fonts/shaping/HarfBuzzShaperTest.cpp
index 64633c9d01d1990bde67b8e0b4c8d85866b2c110..0b8dbb3d1ccc8a93de5837c975b188f020b3571c 100644
--- a/Source/platform/fonts/shaping/HarfBuzzShaperTest.cpp
+++ b/Source/platform/fonts/shaping/HarfBuzzShaperTest.cpp
@@ -29,6 +29,7 @@
delete font;
}
+ HashSet<const SimpleFontData*> fallbackFonts;
FontCachePurgePreventer fontCachePurgePreventer;
FontDescription fontDescription;
Font* font;
@@ -41,7 +42,7 @@
TEST_F(HarfBuzzShaperTest, ResolveCandidateRunsLatin)
{
TextRun latinCommon("ABC DEF.", 8);
- HarfBuzzShaper shaper(font, latinCommon);
+ HarfBuzzShaper shaper(font, latinCommon, &fallbackFonts);
RefPtr<ShapeResult> result = shaper.shapeResult();
ASSERT_EQ(1u, result->numberOfRunsForTesting());
@@ -54,7 +55,7 @@
TEST_F(HarfBuzzShaperTest, ResolveCandidateRunsLeadingCommon)
{
TextRun leadingCommon("... test", 8);
- HarfBuzzShaper shaper(font, leadingCommon);
+ HarfBuzzShaper shaper(font, leadingCommon, &fallbackFonts);
RefPtr<ShapeResult> result = shaper.shapeResult();
ASSERT_EQ(1u, result->numberOfRunsForTesting());
@@ -80,7 +81,7 @@
for (auto& test : testlist) {
String str(test.string);
TextRun run(str);
- HarfBuzzShaper shaper(font, run);
+ HarfBuzzShaper shaper(font, run, &fallbackFonts);
RefPtr<ShapeResult> result = shaper.shapeResult();
EXPECT_EQ(1u, result->numberOfRunsForTesting()) << test.name;
@@ -107,7 +108,7 @@
{
UChar devanagariCommonString[] = { 0x915, 0x94d, 0x930, 0x28, 0x20, 0x29 };
TextRun devanagariCommonLatin(devanagariCommonString, 6);
- HarfBuzzShaper shaper(font, devanagariCommonLatin);
+ HarfBuzzShaper shaper(font, devanagariCommonLatin, &fallbackFonts);
RefPtr<ShapeResult> result = shaper.shapeResult();
ASSERT_EQ(2u, result->numberOfRunsForTesting());
@@ -126,7 +127,7 @@
{
UChar devanagariCommonLatinString[] = { 0x915, 0x94d, 0x930, 0x20, 0x61, 0x62, 0x2E };
TextRun devanagariCommonLatin(devanagariCommonLatinString, 7);
- HarfBuzzShaper shaper(font, devanagariCommonLatin);
+ HarfBuzzShaper shaper(font, devanagariCommonLatin, &fallbackFonts);
RefPtr<ShapeResult> result = shaper.shapeResult();
ASSERT_EQ(3u, result->numberOfRunsForTesting());
@@ -150,7 +151,7 @@
{
UChar mixedString[] = { 0x628, 0x64A, 0x629, 0xE20, 0x65E5, 0x62 };
TextRun mixed(mixedString, 6);
- HarfBuzzShaper shaper(font, mixed);
+ HarfBuzzShaper shaper(font, mixed, &fallbackFonts);
RefPtr<ShapeResult> result = shaper.shapeResult();
ASSERT_EQ(4u, result->numberOfRunsForTesting());
@@ -179,7 +180,7 @@
{
UChar arabicString[] = { 0x628, 0x64A, 0x629 };
TextRun arabic(arabicString, 3);
- HarfBuzzShaper shaper(font, arabic);
+ HarfBuzzShaper shaper(font, arabic, &fallbackFonts);
RefPtr<ShapeResult> result = shaper.shapeResult();
ASSERT_EQ(1u, result->numberOfRunsForTesting());
« no previous file with comments | « Source/platform/fonts/shaping/HarfBuzzShaper.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698