| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2015 Google Inc. All rights reserved. | 2 * Copyright (C) 2015 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 + "/Source/platform/testing/data/" | 45 + "/Source/platform/testing/data/" |
| 46 + relativePath; | 46 + relativePath; |
| 47 } | 47 } |
| 48 | 48 |
| 49 TEST(FontPlatformDataTest, AhemHasNoSpaceInLigaturesOrKerning) | 49 TEST(FontPlatformDataTest, AhemHasNoSpaceInLigaturesOrKerning) |
| 50 { | 50 { |
| 51 Font font = createTestFont("Ahem", fontPath("Ahem.woff"), 16); | 51 Font font = createTestFont("Ahem", fontPath("Ahem.woff"), 16); |
| 52 const FontPlatformData& platformData = font.primaryFont()->platformData(); | 52 const FontPlatformData& platformData = font.primaryFont()->platformData(); |
| 53 TypesettingFeatures features = Kerning | Ligatures; | 53 TypesettingFeatures features = Kerning | Ligatures; |
| 54 | 54 |
| 55 EXPECT_FALSE(platformData.hasSpaceInLigaturesOrKerning(features)); | 55 EXPECT_FALSE(platformData.hasSpaceInLigaturesOrKerning(font.primaryFont()->s
ize(), font.primaryFont()->style(), features)); |
| 56 } | 56 } |
| 57 | 57 |
| 58 TEST(FontPlatformDataTest, AhemSpaceLigatureHasSpaceInLigaturesOrKerning) | 58 TEST(FontPlatformDataTest, AhemSpaceLigatureHasSpaceInLigaturesOrKerning) |
| 59 { | 59 { |
| 60 Font font = createTestFont("AhemSpaceLigature", fontPath("AhemSpaceLigature.
woff"), 16); | 60 Font font = createTestFont("AhemSpaceLigature", fontPath("AhemSpaceLigature.
woff"), 16); |
| 61 const FontPlatformData& platformData = font.primaryFont()->platformData(); | 61 const FontPlatformData& platformData = font.primaryFont()->platformData(); |
| 62 TypesettingFeatures features = Kerning | Ligatures; | 62 TypesettingFeatures features = Kerning | Ligatures; |
| 63 | 63 |
| 64 EXPECT_TRUE(platformData.hasSpaceInLigaturesOrKerning(features)); | 64 EXPECT_TRUE(platformData.hasSpaceInLigaturesOrKerning(font.primaryFont()->si
ze(), font.primaryFont()->style(), features)); |
| 65 } | 65 } |
| 66 | 66 |
| 67 TEST(FontPlatformDataTest, AhemSpaceLigatureHasNoSpaceWithoutFontFeatures) | 67 TEST(FontPlatformDataTest, AhemSpaceLigatureHasNoSpaceWithoutFontFeatures) |
| 68 { | 68 { |
| 69 Font font = createTestFont("AhemSpaceLigature", fontPath("AhemSpaceLigature.
woff"), 16); | 69 Font font = createTestFont("AhemSpaceLigature", fontPath("AhemSpaceLigature.
woff"), 16); |
| 70 const FontPlatformData& platformData = font.primaryFont()->platformData(); | 70 const FontPlatformData& platformData = font.primaryFont()->platformData(); |
| 71 TypesettingFeatures features = 0; | 71 TypesettingFeatures features = 0; |
| 72 | 72 |
| 73 EXPECT_FALSE(platformData.hasSpaceInLigaturesOrKerning(features)); | 73 EXPECT_FALSE(platformData.hasSpaceInLigaturesOrKerning(font.primaryFont()->s
ize(), font.primaryFont()->style(), features)); |
| 74 } | 74 } |
| 75 | 75 |
| 76 } // namespace blink | 76 } // namespace blink |
| OLD | NEW |