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

Side by Side Diff: webkit/tools/test_shell/test_shell_mac.mm

Issue 10686005: Add methods to add DataPack from open files (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 5 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 | « webkit/tools/test_shell/test_shell_gtk.cc ('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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <ApplicationServices/ApplicationServices.h> 5 #include <ApplicationServices/ApplicationServices.h>
6 #import <Cocoa/Cocoa.h> 6 #import <Cocoa/Cocoa.h>
7 #import <objc/objc-runtime.h> 7 #import <objc/objc-runtime.h>
8 #include <sys/stat.h> 8 #include <sys/stat.h>
9 9
10 #include "webkit/tools/test_shell/test_shell.h" 10 #include "webkit/tools/test_shell/test_shell.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 web_prefs_ = new webkit_glue::WebPreferences; 210 web_prefs_ = new webkit_glue::WebPreferences;
211 211
212 // mmap the data pack which holds strings used by WebCore. This is only 212 // mmap the data pack which holds strings used by WebCore. This is only
213 // a fatal error if we're bundled, which means we might be running layout 213 // a fatal error if we're bundled, which means we might be running layout
214 // tests. This is a harmless failure for test_shell_tests. 214 // tests. This is a harmless failure for test_shell_tests.
215 g_resource_data_pack = new ui::DataPack(ui::SCALE_FACTOR_100P); 215 g_resource_data_pack = new ui::DataPack(ui::SCALE_FACTOR_100P);
216 NSString *resource_path = 216 NSString *resource_path =
217 [base::mac::FrameworkBundle() pathForResource:@"test_shell" 217 [base::mac::FrameworkBundle() pathForResource:@"test_shell"
218 ofType:@"pak"]; 218 ofType:@"pak"];
219 FilePath resources_pak_path([resource_path fileSystemRepresentation]); 219 FilePath resources_pak_path([resource_path fileSystemRepresentation]);
220 if (!g_resource_data_pack->Load(resources_pak_path)) { 220 if (!g_resource_data_pack->LoadFromPath(resources_pak_path)) {
221 LOG(FATAL) << "failed to load test_shell.pak"; 221 LOG(FATAL) << "failed to load test_shell.pak";
222 } 222 }
223 223
224 ResetWebPreferences(); 224 ResetWebPreferences();
225 225
226 // Load the Ahem font, which is used by layout tests. 226 // Load the Ahem font, which is used by layout tests.
227 const char* ahem_path_c; 227 const char* ahem_path_c;
228 NSString* ahem_path = [[base::mac::FrameworkBundle() resourcePath] 228 NSString* ahem_path = [[base::mac::FrameworkBundle() resourcePath]
229 stringByAppendingPathComponent:@"AHEM____.TTF"]; 229 stringByAppendingPathComponent:@"AHEM____.TTF"];
230 ahem_path_c = [ahem_path fileSystemRepresentation]; 230 ahem_path_c = [ahem_path fileSystemRepresentation];
(...skipping 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 return false; 695 return false;
696 } 696 }
697 697
698 void DidLoadPlugin(const std::string& filename) { 698 void DidLoadPlugin(const std::string& filename) {
699 } 699 }
700 700
701 void DidUnloadPlugin(const std::string& filename) { 701 void DidUnloadPlugin(const std::string& filename) {
702 } 702 }
703 703
704 } // namespace webkit_glue 704 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/test_shell_gtk.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698