Another unreviewed followup to:
authorbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jul 2018 22:02:30 +0000 (22:02 +0000)
committerbeidson@apple.com <beidson@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Jul 2018 22:02:30 +0000 (22:02 +0000)
Crash notifying observers of responsiveness state change

* TestWebKitAPI/cocoa/TestWKWebView.h:
* TestWebKitAPI/cocoa/TestWKWebView.mm:
(-[TestWKWebView typeCharacter:]): Move this back to the Mac-only category, as we won't be running this
  test on iOS for other reasons.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@233438 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/TestWebKitAPI/cocoa/TestWKWebView.h
Tools/TestWebKitAPI/cocoa/TestWKWebView.mm

index 86a3321..c756026 100644 (file)
@@ -1,5 +1,15 @@
 2018-07-02  Brady Eidson  <beidson@apple.com>
 
+        Another unreviewed followup to:
+        Crash notifying observers of responsiveness state change
+
+        * TestWebKitAPI/cocoa/TestWKWebView.h:
+        * TestWebKitAPI/cocoa/TestWKWebView.mm:
+        (-[TestWKWebView typeCharacter:]): Move this back to the Mac-only category, as we won't be running this
+          test on iOS for other reasons.
+
+2018-07-02  Brady Eidson  <beidson@apple.com>
+
         Unreviewed followup to:
         Crash notifying observers of responsiveness state change
 
index d773037..a5d651a 100644 (file)
@@ -57,7 +57,6 @@
 - (void)waitForMessage:(NSString *)message;
 - (void)performAfterLoading:(dispatch_block_t)actions;
 - (void)waitForNextPresentationUpdate;
-- (void)typeCharacter:(char)character;
 @end
 
 #if PLATFORM(IOS)
@@ -76,6 +75,7 @@
 - (void)mouseMoveToPoint:(NSPoint)point withFlags:(NSEventModifierFlags)flags;
 - (void)sendClicksAtPoint:(NSPoint)point numberOfClicks:(NSUInteger)numberOfClicks;
 - (NSWindow *)hostWindow;
+- (void)typeCharacter:(char)character;
 @end
 #endif
 
index 818a02d..c545a44 100644 (file)
@@ -311,14 +311,6 @@ NSEventMask __simulated_forceClickAssociatedEventsMask(id self, SEL _cmd)
     TestWebKitAPI::Util::run(&done);
 }
 
-- (void)typeCharacter:(char)character {
-    NSString *characterAsString = [NSString stringWithFormat:@"%c" , character];
-    NSEventType keyDownEventType = NSEventTypeKeyDown;
-    NSEventType keyUpEventType = NSEventTypeKeyUp;
-    [self keyDown:[NSEvent keyEventWithType:keyDownEventType location:NSZeroPoint modifierFlags:0 timestamp:GetCurrentEventTime() windowNumber:[_hostWindow windowNumber] context:nil characters:characterAsString charactersIgnoringModifiers:characterAsString isARepeat:NO keyCode:character]];
-    [self keyUp:[NSEvent keyEventWithType:keyUpEventType location:NSZeroPoint modifierFlags:0 timestamp:GetCurrentEventTime() windowNumber:[_hostWindow windowNumber] context:nil characters:characterAsString charactersIgnoringModifiers:characterAsString isARepeat:NO keyCode:character]];
-}
-
 @end
 
 #if PLATFORM(IOS)
@@ -391,6 +383,15 @@ NSEventMask __simulated_forceClickAssociatedEventsMask(id self, SEL _cmd)
 {
     return _hostWindow.get();
 }
+
+- (void)typeCharacter:(char)character {
+    NSString *characterAsString = [NSString stringWithFormat:@"%c" , character];
+    NSEventType keyDownEventType = NSEventTypeKeyDown;
+    NSEventType keyUpEventType = NSEventTypeKeyUp;
+    [self keyDown:[NSEvent keyEventWithType:keyDownEventType location:NSZeroPoint modifierFlags:0 timestamp:GetCurrentEventTime() windowNumber:[_hostWindow windowNumber] context:nil characters:characterAsString charactersIgnoringModifiers:characterAsString isARepeat:NO keyCode:character]];
+    [self keyUp:[NSEvent keyEventWithType:keyUpEventType location:NSZeroPoint modifierFlags:0 timestamp:GetCurrentEventTime() windowNumber:[_hostWindow windowNumber] context:nil characters:characterAsString charactersIgnoringModifiers:characterAsString isARepeat:NO keyCode:character]];
+}
+
 @end
 #endif