From 2ddb245fac99802e63742c21f7da0d499e9cecf6 Mon Sep 17 00:00:00 2001 From: "gtm.daemon" Date: Thu, 15 Apr 2010 17:31:09 +0000 Subject: [Author: dmaclach] refactor GTMUnitTestingUtilities into GTMAppKitUnitTestingUtilties and GTMFoundationUnitTestingUtilities. convert GTMSignalHandler over to using new runloop routines fix bug in GTMSignalHandler API with GC where releasing it wasn't sufficient to stop it listening. R=thomasvl DELTA=1227 (638 added, 566 deleted, 23 changed) --- AppKit/GTMCarbonEventTest.m | 10 +++++----- AppKit/GTMGetURLHandlerTest.m | 1 - AppKit/GTMNSAnimatablePropertyContainerTest.m | 2 +- 3 files changed, 6 insertions(+), 7 deletions(-) (limited to 'AppKit') diff --git a/AppKit/GTMCarbonEventTest.m b/AppKit/GTMCarbonEventTest.m index 81acbd0..4cc039c 100644 --- a/AppKit/GTMCarbonEventTest.m +++ b/AppKit/GTMCarbonEventTest.m @@ -18,7 +18,7 @@ #import "GTMSenTestCase.h" #import "GTMCarbonEvent.h" -#import "GTMUnitTestingUtilities.h" +#import "GTMAppKitUnitTestingUtilities.h" #import "GTMUnitTestDevLog.h" @interface GTMCarbonEventTest : GTMTestCase { @@ -286,7 +286,7 @@ extern EventTargetRef GetApplicationEventTarget(void); // This test can't be run if the screen saver is active because the security // agent blocks us from sending events via remote operations - if (![GTMUnitTestingUtilities isScreenSaverActive]) { + if (![GTMAppKitUnitTestingUtilities isScreenSaverActive]) { GTMCarbonEventDispatcherHandler *dispatcher = [GTMCarbonEventDispatcherHandler sharedEventDispatcherHandler]; STAssertNotNil(dispatcher, @"Unable to acquire singleton"); @@ -312,7 +312,7 @@ extern EventTargetRef GetApplicationEventTarget(void); // correctly hitHotKey: should get called, and hotKeyHit_ will be set for // us. We run the event loop for a set amount of time waiting for this to // happen. - [GTMUnitTestingUtilities postTypeCharacterEvent:'g' modifiers:keyMods]; + [GTMAppKitUnitTestingUtilities postTypeCharacterEvent:'g' modifiers:keyMods]; STAssertTrue([NSApp gtm_runUpToSixtySecondsWithContext:hotKeyHit_], nil); [dispatcher unregisterHotKey:hotKey]; } @@ -322,7 +322,7 @@ extern EventTargetRef GetApplicationEventTarget(void); // This test can't be run if the screen saver is active because the security // agent blocks us from sending events via remote operations - if (![GTMUnitTestingUtilities isScreenSaverActive]) { + if (![GTMAppKitUnitTestingUtilities isScreenSaverActive]) { GTMCarbonEventDispatcherHandler *dispatcher = [GTMCarbonEventDispatcherHandler sharedEventDispatcherHandler]; STAssertNotNil(dispatcher, @"Unable to acquire singleton"); @@ -339,7 +339,7 @@ extern EventTargetRef GetApplicationEventTarget(void); // correctly hitHotKey: should get called, and hotKeyHit_ will be set for // us. We run the event loop for a set amount of time waiting for this to // happen. - [GTMUnitTestingUtilities postTypeCharacterEvent:'g' modifiers:keyMods]; + [GTMAppKitUnitTestingUtilities postTypeCharacterEvent:'g' modifiers:keyMods]; [GTMUnitTestDevLog expectString:@"Exception fired in hotkey: foo (bar)"]; STAssertTrue([NSApp gtm_runUpToSixtySecondsWithContext:hotKeyHit_], nil); [dispatcher unregisterHotKey:hotKey]; diff --git a/AppKit/GTMGetURLHandlerTest.m b/AppKit/GTMGetURLHandlerTest.m index ba0be7d..940d90f 100644 --- a/AppKit/GTMGetURLHandlerTest.m +++ b/AppKit/GTMGetURLHandlerTest.m @@ -16,7 +16,6 @@ // #import "GTMSenTestCase.h" -#import "GTMUnitTestingUtilities.h" #import "GTMUnitTestDevLog.h" static BOOL sURLHandlerWasHit; diff --git a/AppKit/GTMNSAnimatablePropertyContainerTest.m b/AppKit/GTMNSAnimatablePropertyContainerTest.m index 9a1d497..9676086 100644 --- a/AppKit/GTMNSAnimatablePropertyContainerTest.m +++ b/AppKit/GTMNSAnimatablePropertyContainerTest.m @@ -19,7 +19,7 @@ #import "GTMNSAnimatablePropertyContainerTest.h" #import "GTMNSAnimatablePropertyContainer.h" #import "GTMTypeCasting.h" -#import "GTMUnitTestingUtilities.h" +#import "GTMFoundationUnitTestingUtilities.h" #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 -- cgit v1.2.3