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

Unified Diff: Source/platform/fonts/GlyphBufferTest.cpp

Issue 645363003: Consolidate most simple vs. complex Font methods (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: minor cleanup Created 6 years, 2 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/GlyphBuffer.h ('k') | Source/platform/fonts/shaping/HarfBuzzShaper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/GlyphBufferTest.cpp
diff --git a/Source/platform/fonts/GlyphBufferTest.cpp b/Source/platform/fonts/GlyphBufferTest.cpp
index 23bb5b96e22551bf10c65708bd4c5e576a22f02e..d03c74de8c14760c5b3a74f9a098dc60c99f01d9 100644
--- a/Source/platform/fonts/GlyphBufferTest.cpp
+++ b/Source/platform/fonts/GlyphBufferTest.cpp
@@ -50,6 +50,7 @@ TEST(GlyphBufferTest, StoresGlyphs)
glyphBuffer.add(44, font2.get(), 12);
EXPECT_FALSE(glyphBuffer.isEmpty());
+ EXPECT_FALSE(glyphBuffer.hasOffsets());
EXPECT_EQ(3u, glyphBuffer.size());
EXPECT_EQ(42, glyphBuffer.glyphAt(0));
@@ -67,18 +68,15 @@ TEST(GlyphBufferTest, StoresOffsets)
RefPtr<SimpleFontData> font1 = TestSimpleFontData::create();
RefPtr<SimpleFontData> font2 = TestSimpleFontData::create();
- GlyphBufferWithOffsets glyphBuffer;
+ GlyphBuffer glyphBuffer;
glyphBuffer.add(42, font1.get(), FloatSize(10, 0), 0);
glyphBuffer.add(43, font1.get(), FloatSize(15, 0), 0);
glyphBuffer.add(44, font2.get(), FloatSize(12, 2), 0);
EXPECT_FALSE(glyphBuffer.isEmpty());
+ EXPECT_TRUE(glyphBuffer.hasOffsets());
EXPECT_EQ(3u, glyphBuffer.size());
- EXPECT_EQ(FloatSize(10, 0), glyphBuffer.offsetAt(0));
- EXPECT_EQ(FloatSize(15, 0), glyphBuffer.offsetAt(1));
- EXPECT_EQ(FloatSize(12, 2), glyphBuffer.offsetAt(2));
-
const FloatSize* offsets = glyphBuffer.offsets(0);
EXPECT_EQ(FloatSize(10, 0), offsets[0]);
EXPECT_EQ(FloatSize(15, 0), offsets[1]);
« no previous file with comments | « Source/platform/fonts/GlyphBuffer.h ('k') | Source/platform/fonts/shaping/HarfBuzzShaper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698