Bug 97326 - [WK2][WKTR] EventSender needs to implement scheduleAsynchronousClick
Summary: [WK2][WKTR] EventSender needs to implement scheduleAsynchronousClick
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Dumez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-21 04:03 PDT by Chris Dumez
Modified: 2012-09-21 06:16 PDT (History)
5 users (show)

See Also:


Attachments
Patch (10.34 KB, patch)
2012-09-21 04:07 PDT, Chris Dumez
kenneth: review+
cdumez: commit-queue-
Details | Formatted Diff | Diff
Patch (14.01 KB, patch)
2012-09-21 05:29 PDT, Chris Dumez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2012-09-21 04:03:27 PDT
WebKitTestRunner's EventSender does not implement scheduleAsynchronousClick(), causing the following test case to fail:
  fast/events/popup-blocking-click-in-iframe.html
Comment 1 Chris Dumez 2012-09-21 04:07:44 PDT
Created attachment 165111 [details]
Patch
Comment 2 Kenneth Rohde Christiansen 2012-09-21 05:02:34 PDT
Comment on attachment 165111 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=165111&action=review

> Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp:240
> +    WKRetainPtr<WKStringRef> EventSenderMessageName(AdoptWK, WKStringCreateWithUTF8CString("EventSender"));
> +    WKRetainPtr<WKMutableDictionaryRef> EventSenderMessageBody(AdoptWK, WKMutableDictionaryCreate());

Nit: geolocation etc use lowercase messages, maybe we want to be consistent

> Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp:250
> +    WKRetainPtr<WKStringRef> subMessageKey(AdoptWK, WKStringCreateWithUTF8CString("SubMessage"));

Is submessage really a good way to describe this?

> Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp:253
> +    WKBundlePostMessage(InjectedBundle::shared().bundle(), EventSenderMessageName.get(), EventSenderMessageBody.get());

I would add a newline after post

> Tools/WebKitTestRunner/TestController.cpp:694
> +#if PLATFORM(MAC) || PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)

So which webkit2 platforms does this not work on?
Comment 3 Chris Dumez 2012-09-21 05:09:13 PDT
Comment on attachment 165111 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=165111&action=review

>> Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp:240
>> +    WKRetainPtr<WKMutableDictionaryRef> EventSenderMessageBody(AdoptWK, WKMutableDictionaryCreate());
> 
> Nit: geolocation etc use lowercase messages, maybe we want to be consistent

Those messages already exists and their format is already predefined. I cannot change them. Those messages are used already in EventSendingController::mouseDown() and EventSendingController::mouseUp().

>> Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp:250
>> +    WKRetainPtr<WKStringRef> subMessageKey(AdoptWK, WKStringCreateWithUTF8CString("SubMessage"));
> 
> Is submessage really a good way to describe this?

Ditto.

>> Tools/WebKitTestRunner/InjectedBundle/EventSendingController.cpp:253
>> +    WKBundlePostMessage(InjectedBundle::shared().bundle(), EventSenderMessageName.get(), EventSenderMessageBody.get());
> 
> I would add a newline after post

Ok.

>> Tools/WebKitTestRunner/TestController.cpp:694
>> +#if PLATFORM(MAC) || PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
> 
> So which webkit2 platforms does this not work on?

I used this to be consistent with TestController::didReceiveSynchronousMessageFromInjectedBundle().
Comment 4 Chris Dumez 2012-09-21 05:23:37 PDT
Comment on attachment 165111 [details]
Patch

I think I can do some refactoring to avoid patch duplication.
Comment 5 Chris Dumez 2012-09-21 05:29:05 PDT
Created attachment 165120 [details]
Patch

- Add createMouseMessageBody() convenience function to avoid code duplication for creating mouse messages
- Add newline as suggested by Kenneth
Comment 6 Kenneth Rohde Christiansen 2012-09-21 06:06:59 PDT
Comment on attachment 165120 [details]
Patch

nice
Comment 7 WebKit Review Bot 2012-09-21 06:15:57 PDT
Comment on attachment 165120 [details]
Patch

Clearing flags on attachment: 165120

Committed r129220: <http://trac.webkit.org/changeset/129220>
Comment 8 WebKit Review Bot 2012-09-21 06:16:02 PDT
All reviewed patches have been landed.  Closing bug.