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

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

Issue 5950003: Remove CrApplication dependency from base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/base
Patch Set: '' Created 10 years 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
« no previous file with comments | « chrome/test/out_of_proc_test_runner.cc ('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 b02da7dae41fca8b785093d844be606fd8ac0126..5f1fcd02eb3ce9d2e054fe6a9b186d802803f100 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;
+@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.
@@ -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]);
« no previous file with comments | « chrome/test/out_of_proc_test_runner.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698