The API was added to EWK without unit tests.
Created attachment 159185 [details] Patch
Created attachment 159187 [details] Patch
Comment on attachment 159187 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=159187&action=review > Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:121 > +void EWK2UnitTestBase::simulateClick(int x, int y) > +{ > + Evas* evas = evas_object_evas_get(m_webView); > + evas_event_feed_mouse_move(evas, x, y, 0, 0); > + evas_event_feed_mouse_down(evas, /* Left */ 1, EVAS_BUTTON_NONE, 0, 0); > + evas_event_feed_mouse_up(evas, /* Left */ 1, EVAS_BUTTON_NONE, 0, 0); > +} It turned out that the idea of injecting the WebKitTestRunner bundle into our API test runner was overkill. IMO this KISS approach is the way to go. The only two things I would like to suggest here is to change rename to simulateLeftClick (like in the Tools/TestWebKitAPI) and use unsigned int at the coordinates. > Source/WebKit2/UIProcess/API/efl/tests/resources/intent-request.html:1 > +<html> Nit: s/intent-request.html/intent_request.html
Comment on attachment 159187 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=159187&action=review >> Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:121 >> +} > > It turned out that the idea of injecting the WebKitTestRunner bundle into our API test runner was overkill. IMO this KISS approach is the way to go. The only two things I would like to suggest here is to change rename to simulateLeftClick (like in the Tools/TestWebKitAPI) and use unsigned int at the coordinates. Why switch to unsigned? See EFL prototype: evas_event_feed_mouse_move (Evas *e, int x, int y, unsigned int timestamp, const void *data); Regarding the renaming to simulateLeftClick(). I'm not convinced either. By default, a click is a left click. Also, I don't believe we will ever add a simulateRightClick() function. If we later need right click, we would probably add a "button" argument to simulateClick(). >> Source/WebKit2/UIProcess/API/efl/tests/resources/intent-request.html:1 >> +<html> > > Nit: s/intent-request.html/intent_request.html I'm already using intent-service.html so it is consistent.
Comment on attachment 159187 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=159187&action=review > Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:122 > + I would just call it mouseClick or similar. I think this is what Qt does. Qt additionally has touchTap() etc.
Created attachment 159283 [details] Patch Rename simulateClick() to mouseClick() as suggested by Kenneth.
Comment on attachment 159283 [details] Patch LGTM. Thanks!
Comment on attachment 159283 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=159283&action=review > Source/WebKit2/ChangeLog:14 > + (EWK2UnitTest::EWK2UnitTestBase::simulateClick): Add utility method to simulate a click at given you need to remember to update the changelog, check the webkit wiki, there is a tool you can hook up with git
Created attachment 159292 [details] Patch for landing Could someone please cq+ ?
Comment on attachment 159292 [details] Patch for landing Clearing flags on attachment: 159292 Committed r125974: <http://trac.webkit.org/changeset/125974>
All reviewed patches have been landed. Closing bug.