summaryrefslogtreecommitdiffstats
path: root/webkit/support/platform_support_mac.mm
diff options
context:
space:
mode:
authorjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-21 00:41:29 +0000
committerjcivelli@chromium.org <jcivelli@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-21 00:41:29 +0000
commitd54ce3203dbce1a43e810267d7372e8611a2b627 (patch)
tree88e087ea6160c183cc2db42e187cdb0d95d3965a /webkit/support/platform_support_mac.mm
parentd223979d4ccce849a7ffeb0dc93baf60d3b00019 (diff)
downloadchromium_src-d54ce3203dbce1a43e810267d7372e8611a2b627.zip
chromium_src-d54ce3203dbce1a43e810267d7372e8611a2b627.tar.gz
chromium_src-d54ce3203dbce1a43e810267d7372e8611a2b627.tar.bz2
Disabling DRT related initializations in unit-test mode.
WebKit unit-tests using webkit_support fail with these initializations as the test executable doesn't have any packages. BUG=None TEST=None Review URL: http://codereview.chromium.org/3148024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56949 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/support/platform_support_mac.mm')
-rw-r--r--webkit/support/platform_support_mac.mm7
1 files changed, 5 insertions, 2 deletions
diff --git a/webkit/support/platform_support_mac.mm b/webkit/support/platform_support_mac.mm
index 305adbf..a0e426c 100644
--- a/webkit/support/platform_support_mac.mm
+++ b/webkit/support/platform_support_mac.mm
@@ -24,7 +24,7 @@ namespace webkit_support {
static NSAutoreleasePool* autorelease_pool;
-void BeforeInitialize() {
+void BeforeInitialize(bool unit_test_mode) {
// Need to initialize NSAutoreleasePool before InitWebCoreSystemInterface().
autorelease_pool = [[NSAutoreleasePool alloc] init];
DCHECK(autorelease_pool);
@@ -93,7 +93,10 @@ static void SwizzleNSPasteboard() {
#endif
}
-void AfterInitialize() {
+void AfterInitialize(bool unit_test_mode) {
+ if (unit_test_mode)
+ return; // We don't have a resource pack when running the unit-tests.
+
// Load a data pack.
g_resource_data_pack = new base::DataPack;
NSString* resource_path =