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

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

Issue 10151025: Add scale factor tag to data packs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 8 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « webkit/support/platform_support_mac.mm ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 205
206 window_list_ = new WindowList; 206 window_list_ = new WindowList;
207 layout_test_mode_ = layout_test_mode; 207 layout_test_mode_ = layout_test_mode;
208 allow_external_pages_ = allow_external_pages; 208 allow_external_pages_ = allow_external_pages;
209 209
210 web_prefs_ = new WebPreferences; 210 web_prefs_ = new 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; 215 g_resource_data_pack = new ui::DataPack(ui::ResourceHandle::kScaleFactor100x);
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->Load(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
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 return false; 692 return false;
693 } 693 }
694 694
695 void DidLoadPlugin(const std::string& filename) { 695 void DidLoadPlugin(const std::string& filename) {
696 } 696 }
697 697
698 void DidUnloadPlugin(const std::string& filename) { 698 void DidUnloadPlugin(const std::string& filename) {
699 } 699 }
700 700
701 } // namespace webkit_glue 701 } // namespace webkit_glue
OLDNEW
« no previous file with comments | « webkit/support/platform_support_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698