Chromium Code Reviews| 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 b02da7dae41fca8b785093d844be606fd8ac0126..225e47d38262abc57fd46233c1451a31c84d286f 100644 |
| --- a/webkit/tools/test_shell/test_shell_platform_delegate_mac.mm |
| +++ b/webkit/tools/test_shell/test_shell_platform_delegate_mac.mm |
| @@ -10,9 +10,9 @@ |
| #import <objc/objc-runtime.h> |
| #include <mach/task.h> |
| -#include "base/chrome_application_mac.h" |
| #include "base/command_line.h" |
| #include "base/logging.h" |
| +#include "base/message_pump_mac.h" |
| #include "third_party/WebKit/WebKit/mac/WebCoreSupport/WebSystemInterface.h" |
| #include "webkit/tools/test_shell/test_shell.h" |
| #include "webkit/tools/test_shell/test_shell_platform_delegate.h" |
| @@ -20,6 +20,26 @@ |
| static NSAutoreleasePool *gTestShellAutoreleasePool = nil; |
| +@interface CrApplication : NSApplication<CrAppProtocol> { |
| + @private |
| + BOOL handlingSendEvent_; |
| +} |
| +- (BOOL)isHandlingSendEvent; |
|
dmac
2010/12/17 18:00:16
Use a property to mimic what you did in chrome_app
Nico
2010/12/18 01:14:28
Done.
|
| +@end |
| + |
| +@implementation CrApplication |
| +- (BOOL)isHandlingSendEvent { |
| + return handlingSendEvent_; |
| +} |
| + |
| +- (void)sendEvent:(NSEvent*)event { |
| + BOOL b = handlingSendEvent_; |
|
Mark Mentovai
2010/12/17 17:31:38
What does b signify?
wasHandlingSendEvent?
Nico
2010/12/18 01:14:28
Done.
|
| + handlingSendEvent_ = YES; |
| + [super sendEvent:event]; |
| + handlingSendEvent_ = b; |
| +} |
| +@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. |
| @@ -90,10 +110,12 @@ static void ClearAnyDefaultsForLayoutTests(void) { |
| #if OBJC_API_VERSION == 2 |
| static void SwizzleAllMethods(Class imposter, Class original) { |
| unsigned int imposterMethodCount = 0; |
| - Method* imposterMethods = class_copyMethodList(imposter, &imposterMethodCount); |
| + Method* imposterMethods = |
| + class_copyMethodList(imposter, &imposterMethodCount); |
| unsigned int originalMethodCount = 0; |
| - Method* originalMethods = class_copyMethodList(original, &originalMethodCount); |
| + Method* originalMethods = |
| + class_copyMethodList(original, &originalMethodCount); |
| for (unsigned int i = 0; i < imposterMethodCount; i++) { |
| SEL imposterMethodName = method_getName(imposterMethods[i]); |