| Index: webkit/tools/test_shell/test_shell_platform_delegate_mac.mm
|
| diff --git a/webkit/tools/test_shell/test_shell_platform_delegate_mac.mm b/webkit/tools/test_shell/test_shell_platform_delegate_mac.mm
|
| index f85644884557aeeca53311564ca39194addc3cb9..8490f25023a771b748996cbdca9ae6093fa90756 100644
|
| --- a/webkit/tools/test_shell/test_shell_platform_delegate_mac.mm
|
| +++ b/webkit/tools/test_shell/test_shell_platform_delegate_mac.mm
|
| @@ -13,6 +13,7 @@
|
| #include "base/command_line.h"
|
| #include "base/logging.h"
|
| #include "base/message_pump_mac.h"
|
| +#import "base/test/mock_chrome_application_mac.h"
|
| #include "third_party/WebKit/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.h"
|
| #include "webkit/tools/test_shell/test_shell.h"
|
| #include "webkit/tools/test_shell/test_shell_platform_delegate.h"
|
| @@ -20,26 +21,6 @@
|
|
|
| static NSAutoreleasePool *gTestShellAutoreleasePool = nil;
|
|
|
| -@interface CrApplication : NSApplication<CrAppProtocol> {
|
| - @private
|
| - BOOL handlingSendEvent_;
|
| -}
|
| -- (BOOL)isHandlingSendEvent;
|
| -@end
|
| -
|
| -@implementation CrApplication
|
| -- (BOOL)isHandlingSendEvent {
|
| - return handlingSendEvent_;
|
| -}
|
| -
|
| -- (void)sendEvent:(NSEvent*)event {
|
| - BOOL wasHandlingSendEvent = handlingSendEvent_;
|
| - handlingSendEvent_ = YES;
|
| - [super sendEvent:event];
|
| - handlingSendEvent_ = wasHandlingSendEvent;
|
| -}
|
| -@end
|
| -
|
| static void SetDefaultsToLayoutTestValues(void) {
|
| // So we can match the WebKit layout tests, we want to force a bunch of
|
| // preferences that control appearance to match.
|
| @@ -172,15 +153,15 @@ static void SwizzleNSPasteboard(void) {
|
| TestShellPlatformDelegate::TestShellPlatformDelegate(
|
| const CommandLine &command_line)
|
| : command_line_(command_line) {
|
| - // Force AppKit to init itself, but don't start the runloop yet
|
| - [CrApplication sharedApplication];
|
| gTestShellAutoreleasePool = [[NSAutoreleasePool alloc] init];
|
| + // Force AppKit to init itself, but don't start the runloop yet
|
| + [MockCrApp sharedApplication];
|
| InitWebCoreSystemInterface();
|
| [NSBundle loadNibNamed:@"MainMenu" owner:NSApp];
|
| }
|
|
|
| TestShellPlatformDelegate::~TestShellPlatformDelegate() {
|
| - [gTestShellAutoreleasePool release];
|
| + [gTestShellAutoreleasePool drain];
|
| }
|
|
|
| bool TestShellPlatformDelegate::CheckLayoutTestSystemDependencies() {
|
|
|