RESOLVED FIXED 116601
[EFL][WK2] Fix test_ewk2_context_menu
https://bugs.webkit.org/show_bug.cgi?id=116601
Summary [EFL][WK2] Fix test_ewk2_context_menu
Michal Pakula vel Rutka
Reported 2013-05-22 02:33:29 PDT
test_ewk2_context_menu is always passing, it does not test any context menu feature as it ends before context menu is called.
Attachments
proposed patch (12.17 KB, patch)
2013-05-27 08:28 PDT, Michal Pakula vel Rutka
no flags
patch (14.09 KB, patch)
2013-06-07 01:48 PDT, Michal Pakula vel Rutka
no flags
fixes after review (14.88 KB, patch)
2013-06-07 05:56 PDT, Michal Pakula vel Rutka
no flags
Michal Pakula vel Rutka
Comment 1 2013-05-27 08:28:59 PDT
Created attachment 202988 [details] proposed patch
Michal Pakula vel Rutka
Comment 2 2013-06-07 01:48:02 PDT
Grzegorz Czajkowski
Comment 3 2013-06-07 03:02:42 PDT
Comment on attachment 204013 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=204013&action=review > Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:227 > +bool EWK2UnitTestBase::waitUntilTrue(bool &flag, double timeoutSeconds) flag doesn't need to be passed as a reference, the method doesn't change it. > Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:53 > + bool waitUntilTrue(bool &flag, double timeoutSeconds = defaultTimeoutSeconds); timeoutSeconds -> timeoutInSeconds ? defaultTimeoutSeconds -> defaultTimeoutInSeconds ? ( I don't think the reviewers will be against of changing it even if this patch doesn't introduce it) > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:33 > +static const int customItemTag = EWK_CONTEXT_MENU_ITEM_BASE_APPLICATION_TAG; It seems that it's always converted to Ewk_Context_Menu_Item_Action. Wouldn't be better to define it as Ewk_Context_Menu_Item_Action? > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:76 > + ewk_context_menu_item_title_set(item, "Copy Link"); It'd be nice to define all those item titles somewhere. > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:88 > + Could you add short note what the callback tests? > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:120 > + Ditto. > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:161 > return true; return testFinished;
Grzegorz Czajkowski
Comment 4 2013-06-07 03:13:03 PDT
Comment on attachment 204013 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=204013&action=review >> Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:227 >> +bool EWK2UnitTestBase::waitUntilTrue(bool &flag, double timeoutSeconds) > > flag doesn't need to be passed as a reference, the method doesn't change it. Please skip this comment. I missed that it's changed somewhere else.
Michal Pakula vel Rutka
Comment 5 2013-06-07 03:32:01 PDT
Comment on attachment 204013 [details] patch View in context: https://bugs.webkit.org/attachment.cgi?id=204013&action=review >> Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:53 >> + bool waitUntilTrue(bool &flag, double timeoutSeconds = defaultTimeoutSeconds); > > timeoutSeconds -> timeoutInSeconds ? > defaultTimeoutSeconds -> defaultTimeoutInSeconds ? ( I don't think the reviewers will be against of changing it even if this patch doesn't introduce it) defaultTimeoutSeconds and timeoutSeconds are used in several places in this file, I would rather change the names in separate patch >> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:33 >> +static const int customItemTag = EWK_CONTEXT_MENU_ITEM_BASE_APPLICATION_TAG; > > It seems that it's always converted to Ewk_Context_Menu_Item_Action. Wouldn't be better to define it as Ewk_Context_Menu_Item_Action? done >> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:76 >> + ewk_context_menu_item_title_set(item, "Copy Link"); > > It'd be nice to define all those item titles somewhere. done >> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:88 >> + > > Could you add short note what the callback tests? done
Michal Pakula vel Rutka
Comment 6 2013-06-07 05:56:19 PDT
Created attachment 204034 [details] fixes after review
Chris Dumez
Comment 7 2013-06-10 02:38:45 PDT
Comment on attachment 204034 [details] fixes after review View in context: https://bugs.webkit.org/attachment.cgi?id=204034&action=review LGTM. I'll let Gyuyoung take a look. > Source/WebKit2/UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:227 > +bool EWK2UnitTestBase::waitUntilTrue(bool &flag, double timeoutSeconds) Nice addition.
Gyuyoung Kim
Comment 8 2013-06-10 18:49:59 PDT
Comment on attachment 204034 [details] fixes after review Looks nice as well.
WebKit Commit Bot
Comment 9 2013-06-11 01:35:54 PDT
Comment on attachment 204034 [details] fixes after review Clearing flags on attachment: 204034 Committed r151428: <http://trac.webkit.org/changeset/151428>
WebKit Commit Bot
Comment 10 2013-06-11 01:35:58 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.