RESOLVED FIXED 118392
[EFL][WK2] Implement unit test callbacks: onWordLearn and onWordIgnore
https://bugs.webkit.org/show_bug.cgi?id=118392
Summary [EFL][WK2] Implement unit test callbacks: onWordLearn and onWordIgnore
Krzysztof Wolanski
Reported 2013-07-04 06:47:11 PDT
Simulate behavior of Learn and Ignore Word in the text field.
Attachments
proposed patch (8.74 KB, patch)
2013-07-04 06:50 PDT, Krzysztof Wolanski
no flags
apply suggestions (8.76 KB, patch)
2013-07-04 08:02 PDT, Krzysztof Wolanski
no flags
apply suggestions (8.77 KB, patch)
2013-07-04 08:08 PDT, Krzysztof Wolanski
cdumez: review+
apply suggestions (8.69 KB, patch)
2013-07-05 01:45 PDT, Krzysztof Wolanski
no flags
Krzysztof Wolanski
Comment 1 2013-07-04 06:50:14 PDT
Created attachment 206084 [details] proposed patch
Chris Dumez
Comment 2 2013-07-04 07:51:33 PDT
Comment on attachment 206084 [details] proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=206084&action=review > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:807 > + knownWord = ""; knownWord = String()? > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:839 > + knownWord = ""; knownWord = String()?
Mikhail Pozdnyakov
Comment 3 2013-07-04 07:58:36 PDT
Comment on attachment 206084 [details] proposed patch View in context: https://bugs.webkit.org/attachment.cgi?id=206084&action=review > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:55 > +String knownWord; why not static? >> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:807 >> + knownWord = ""; > > knownWord = String()? emptyString() ?
Krzysztof Wolanski
Comment 4 2013-07-04 08:02:36 PDT
Created attachment 206088 [details] apply suggestions
Chris Dumez
Comment 5 2013-07-04 08:03:51 PDT
> >> Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:807 > >> + knownWord = ""; > > > > knownWord = String()? > > emptyString() ? Right, emptyString() is better indeed.
Chris Dumez
Comment 6 2013-07-04 08:04:26 PDT
Why no review flag?
Krzysztof Wolanski
Comment 7 2013-07-04 08:08:06 PDT
Created attachment 206090 [details] apply suggestions
Chris Dumez
Comment 8 2013-07-04 08:14:20 PDT
Comment on attachment 206090 [details] apply suggestions Ok, r=me but please let Grzegorz have a look before landing.
Grzegorz Czajkowski
Comment 9 2013-07-05 00:07:46 PDT
Comment on attachment 206090 [details] apply suggestions View in context: https://bugs.webkit.org/attachment.cgi?id=206090&action=review I'd love to see it in the trunk. Added one comments regarding to the spellchecking and one nit. > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:188 > + *misspellingLength = static_cast<int32_t>(knownWord.length()); As I understand correctly, this callback should treat known words as spelled correctly. Therefore, its length should be set to 0 to notify WebCore to don't create spelling marker for it. Additionally, the location should be set to -1 according to the doc. > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:813 > + mouseDoubleClick(10, 20, 1 /* Left button */); Can we skip left button value and this comment here? mouseDoubleClick passes left button implicitly. > Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:845 > + mouseDoubleClick(10, 20, 1 /* Left button */); Ditto.
Krzysztof Wolanski
Comment 10 2013-07-05 01:45:37 PDT
Created attachment 206127 [details] apply suggestions
Grzegorz Czajkowski
Comment 11 2013-07-05 02:48:25 PDT
Comment on attachment 206127 [details] apply suggestions Thanks
WebKit Commit Bot
Comment 12 2013-07-05 03:29:59 PDT
Comment on attachment 206127 [details] apply suggestions Clearing flags on attachment: 206127 Committed r152414: <http://trac.webkit.org/changeset/152414>
WebKit Commit Bot
Comment 13 2013-07-05 03:30:02 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.