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

Unified Diff: webkit/tools/test_shell/test_shell_platform_delegate_mac.mm

Issue 8724004: [Mac] Move ScopedSendingEvent from content/common/mac to base/mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add CrAppControlProtocol support to CrDrtApplication Created 9 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« content/content_tests.gypi ('K') | « webkit/support/drt_application_mac.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« content/content_tests.gypi ('K') | « webkit/support/drt_application_mac.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698