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

Side by Side Diff: tests/TypefaceTest.cpp

Issue 2202703002: Replace 'Ulta' with 'Ultra'. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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
« no previous file with comments | « src/ports/SkFontMgr_fontconfig.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include "SkData.h" 8 #include "SkData.h"
9 #include "SkOTTable_OS_2.h" 9 #include "SkOTTable_OS_2.h"
10 #include "SkSFNTHeader.h" 10 #include "SkSFNTHeader.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 if (!stream) { 76 if (!stream) {
77 REPORT_FAILURE(reporter, "/fonts/Em.ttf", SkString("Cannot load resource ")); 77 REPORT_FAILURE(reporter, "/fonts/Em.ttf", SkString("Cannot load resource "));
78 return; 78 return;
79 } 79 }
80 sk_sp<SkData> data(SkData::MakeFromStream(stream.get(), stream->getLength()) ); 80 sk_sp<SkData> data(SkData::MakeFromStream(stream.get(), stream->getLength()) );
81 81
82 using SkFS = SkFontStyle; 82 using SkFS = SkFontStyle;
83 for (int weight = SkFS::kInvisible_Weight; weight <= SkFS::kExtraBlack_Weigh t; ++weight) { 83 for (int weight = SkFS::kInvisible_Weight; weight <= SkFS::kExtraBlack_Weigh t; ++weight) {
84 TypefaceStyle_test(reporter, weight, 5, data.get()); 84 TypefaceStyle_test(reporter, weight, 5, data.get());
85 } 85 }
86 for (int width = SkFS::kUltraCondensed_Width; width <= SkFS::kUltaExpanded_W idth; ++width) { 86 for (int width = SkFS::kUltraCondensed_Width; width <= SkFS::kUltraExpanded_ Width; ++width) {
87 TypefaceStyle_test(reporter, 400, width, data.get()); 87 TypefaceStyle_test(reporter, 400, width, data.get());
88 } 88 }
89 } 89 }
90 90
91 DEF_TEST(Typeface, reporter) { 91 DEF_TEST(Typeface, reporter) {
92 92
93 sk_sp<SkTypeface> t1(SkTypeface::MakeFromName(nullptr, SkFontStyle())); 93 sk_sp<SkTypeface> t1(SkTypeface::MakeFromName(nullptr, SkFontStyle()));
94 sk_sp<SkTypeface> t2(SkTypeface::MakeDefault(SkTypeface::kNormal)); 94 sk_sp<SkTypeface> t2(SkTypeface::MakeDefault(SkTypeface::kNormal));
95 95
96 REPORTER_ASSERT(reporter, SkTypeface::Equal(t1.get(), t2.get())); 96 REPORTER_ASSERT(reporter, SkTypeface::Equal(t1.get(), t2.get()));
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
166 REPORTER_ASSERT(reporter, count(reporter, cache) == 2); 166 REPORTER_ASSERT(reporter, count(reporter, cache) == 2);
167 cache.purgeAll(); 167 cache.purgeAll();
168 REPORTER_ASSERT(reporter, count(reporter, cache) == 2); 168 REPORTER_ASSERT(reporter, count(reporter, cache) == 2);
169 } 169 }
170 REPORTER_ASSERT(reporter, count(reporter, cache) == 2); 170 REPORTER_ASSERT(reporter, count(reporter, cache) == 2);
171 cache.purgeAll(); 171 cache.purgeAll();
172 REPORTER_ASSERT(reporter, count(reporter, cache) == 1); 172 REPORTER_ASSERT(reporter, count(reporter, cache) == 1);
173 } 173 }
174 REPORTER_ASSERT(reporter, t1->unique()); 174 REPORTER_ASSERT(reporter, t1->unique());
175 } 175 }
OLDNEW
« no previous file with comments | « src/ports/SkFontMgr_fontconfig.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698