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

Unified Diff: webkit/tools/test_shell/test_shell_mac.mm

Issue 28214: Add a macutil for the main app bundle and override... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 10 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
« base/mac_util.mm ('K') | « webkit/tools/test_shell/run_all_tests.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/test_shell_mac.mm
===================================================================
--- webkit/tools/test_shell/test_shell_mac.mm (revision 10790)
+++ webkit/tools/test_shell/test_shell_mac.mm (working copy)
@@ -180,26 +180,9 @@
// Load the Ahem font, which is used by layout tests.
const char* ahem_path_c;
- FilePath ahem_path; // Ensure ahem_path_c storage is not freed too soon.
- if (mac_util::AmIBundled()) {
- // When bundled (in TestShell.app), expect to find the font in
- // Contents/Resources.
- NSString* ahem_path = [[[NSBundle mainBundle] resourcePath]
- stringByAppendingPathComponent:@"AHEM____.TTF"];
- ahem_path_c = [ahem_path fileSystemRepresentation];
- } else {
- // When not bundled (in test_shell_tests), look in the source tree for
- // the font.
- PathService::Get(base::DIR_SOURCE_ROOT, &ahem_path);
- ahem_path = ahem_path.Append("webkit");
- ahem_path = ahem_path.Append("tools");
- ahem_path = ahem_path.Append("test_shell");
- ahem_path = ahem_path.Append("resources");
- ahem_path = ahem_path.Append("AHEM____.TTF");
-
- ahem_path_c = ahem_path.value().c_str();
- }
-
+ NSString* ahem_path = [[mac_util::MainAppBundle() resourcePath]
+ stringByAppendingPathComponent:@"AHEM____.TTF"];
+ ahem_path_c = [ahem_path fileSystemRepresentation];
FSRef ahem_fsref;
if (!mac_util::FSRefFromPath(ahem_path_c, &ahem_fsref)) {
DLOG(FATAL) << "FSRefFromPath " << ahem_path_c;
« base/mac_util.mm ('K') | « webkit/tools/test_shell/run_all_tests.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698