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

Side by Side Diff: tests/FontHostTest.cpp

Issue 428443002: Cleanup: Rename SkOSPath functions. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix Created 6 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 | « tests/DocumentTest.cpp ('k') | tests/ImageDecodingTest.cpp » ('j') | 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 2012 Google Inc. 2 * Copyright 2012 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 "Resources.h" 8 #include "Resources.h"
9 #include "SkEndian.h" 9 #include "SkEndian.h"
10 #include "SkFontStream.h" 10 #include "SkFontStream.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 } 148 }
149 } 149 }
150 150
151 static void test_fontstream(skiatest::Reporter* reporter) { 151 static void test_fontstream(skiatest::Reporter* reporter) {
152 // This test cannot run if there is no resource path. 152 // This test cannot run if there is no resource path.
153 SkString resourcePath = GetResourcePath(); 153 SkString resourcePath = GetResourcePath();
154 if (resourcePath.isEmpty()) { 154 if (resourcePath.isEmpty()) {
155 SkDebugf("Could not run fontstream test because resourcePath not specifi ed."); 155 SkDebugf("Could not run fontstream test because resourcePath not specifi ed.");
156 return; 156 return;
157 } 157 }
158 SkString filename = SkOSPath::SkPathJoin(resourcePath.c_str(), "test.ttc"); 158 SkString filename = SkOSPath::Join(resourcePath.c_str(), "test.ttc");
159 159
160 SkFILEStream stream(filename.c_str()); 160 SkFILEStream stream(filename.c_str());
161 if (stream.isValid()) { 161 if (stream.isValid()) {
162 test_fontstream(reporter, &stream); 162 test_fontstream(reporter, &stream);
163 } else { 163 } else {
164 SkDebugf("Could not run fontstream test because test.ttc not found."); 164 SkDebugf("Could not run fontstream test because test.ttc not found.");
165 } 165 }
166 } 166 }
167 167
168 static void test_tables(skiatest::Reporter* reporter, SkTypeface* face) { 168 static void test_tables(skiatest::Reporter* reporter, SkTypeface* face) {
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 } 300 }
301 } 301 }
302 302
303 DEF_TEST(FontHost, reporter) { 303 DEF_TEST(FontHost, reporter) {
304 test_tables(reporter); 304 test_tables(reporter);
305 test_fontstream(reporter); 305 test_fontstream(reporter);
306 test_advances(reporter); 306 test_advances(reporter);
307 } 307 }
308 308
309 // need tests for SkStrSearch 309 // need tests for SkStrSearch
OLDNEW
« no previous file with comments | « tests/DocumentTest.cpp ('k') | tests/ImageDecodingTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698