Bug 132982 - [EFL][[WK2] test_ewk2_text_checker is failed
Summary: [EFL][[WK2] test_ewk2_text_checker is failed
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Grzegorz Czajkowski
URL:
Keywords:
Depends on:
Blocks: 132813
  Show dependency treegraph
 
Reported: 2014-05-15 18:14 PDT by Gyuyoung Kim
Modified: 2014-12-10 04:59 PST (History)
4 users (show)

See Also:


Attachments
test case (418 bytes, text/html)
2014-12-09 07:45 PST, Grzegorz Czajkowski
no flags Details
Patch (2.70 KB, patch)
2014-12-10 02:52 PST, Grzegorz Czajkowski
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Gyuyoung Kim 2014-05-15 18:14:41 PDT
[ RUN      ] EWK2TextCheckerTest.ewk_text_checker_unique_spell_document_tag
/mnt/buildbot/WebKit-BuildSlave/efl-linux-64-release-wk2/build/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:760: Failure
Value of: callbacksExecutionStats.spellDocumentTag
  Actual: false
Expected: true
[  FAILED  ] EWK2TextCheckerTest.ewk_text_checker_unique_spell_document_tag (610 ms)
[ RUN      ] EWK2TextCheckerTest.ewk_text_checker_string_spelling_check_cb_set
/mnt/buildbot/WebKit-BuildSlave/efl-linux-64-release-wk2/build/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:781: Failure
Value of: callbacksExecutionStats.spellingCheck
  Actual: false
Expected: true
[  FAILED  ] EWK2TextCheckerTest.ewk_text_checker_string_spelling_check_cb_set (689 ms)
[ RUN      ] EWK2TextCheckerTest.ewk_text_checker_word_guesses_get_cb_set
[       OK ] EWK2TextCheckerTest.ewk_text_checker_word_guesses_get_cb_set (1191 ms)
[ RUN      ] EWK2TextCheckerTest.ewk_text_checker_word_learn_cb_set
/mnt/buildbot/WebKit-BuildSlave/efl-linux-64-release-wk2/build/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:833: Failure
Value of: callbacksExecutionStats.spellingCheck
  Actual: false
Expected: true
[  FAILED  ] EWK2TextCheckerTest.ewk_text_checker_word_learn_cb_set (1195 ms)
[ RUN      ] EWK2TextCheckerTest.ewk_text_checker_word_ignore_cb_set
/mnt/buildbot/WebKit-BuildSlave/efl-linux-64-release-wk2/build/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:167: Failure
Value of: text
  Actual: "aa"
Expected: knownWord.utf8().data()
Which is: ""
/mnt/buildbot/WebKit-BuildSlave/efl-linux-64-release-wk2/build/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:318: Failure
Value of: ignoreSpellingItem
  Actual: false
Expected: true
ERR<1875>: /mnt/buildbot/WebKit-BuildSlave/efl-linux-64-release-wk2/build/Source/WebKit2/UIProcess/API/efl/ewk_context_menu.cpp:158 ewk_context_menu_item_select() safety check failed: item == NULL
/mnt/buildbot/WebKit-BuildSlave/efl-linux-64-release-wk2/build/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:167: Failure
Value of: text
  Actual: "aa"
Expected: knownWord.utf8().data()
Which is: ""
/mnt/buildbot/WebKit-BuildSlave/efl-linux-64-release-wk2/build/Source/WebKit2/UIProcess/API/efl/tests/test_ewk2_text_checker.cpp:856: Failure
Value of: waitUntilTrue(callbacksExecutionStats.wordIgnore)
  Actual: false
Expected: true
[  FAILED  ] EWK2TextCheckerTest.ewk_text_checker_word_ignore_cb_set (10624 ms)
[----------] 18 tests from EWK2TextCheckerTest (22989 ms total)

[----------] Global test environment tear-down
[==========] 18 tests from 1 test case ran. (22989 ms total)
[  PASSED  ] 14 tests.
[  FAILED  ] 4 tests, listed below:
[  FAILED  ] EWK2TextCheckerTest.ewk_text_checker_unique_spell_document_tag
[  FAILED  ] EWK2TextCheckerTest.ewk_text_checker_string_spelling_check_cb_set
[  FAILED  ] EWK2TextCheckerTest.ewk_text_checker_word_learn_cb_set
[  FAILED  ] EWK2TextCheckerTest.ewk_text_checker_word_ignore_cb_set

 4 FAILED TESTS
Comment 1 Grzegorz Czajkowski 2014-12-09 07:43:41 PST
The reason why EFL's text checker API fails is that the input element's value change (from JS) does not invoke spell checker (unless user starts typing manually).

FAIL:
document.getElementById("spellTest").value = "TextThatShouldBeMarkedAsMisspelled ";

PASS:
document.execCommand("InsertText", false, "TextThatShouldBeMarkedAsMisspelled ");

Ryosuke, is it ok that we omit spellchecking for programmatically input.value changes? It seems that it worked as those tests were passing (can not find revision as it was long time ago).

FYI, Safari, Chrome EFL's MiniBrowser does not trigger spellcecking for input.value changes.
Comment 2 Grzegorz Czajkowski 2014-12-09 07:45:22 PST
Created attachment 242919 [details]
test case
Comment 3 Grzegorz Czajkowski 2014-12-10 01:50:52 PST
(In reply to comment #1)
> The reason why EFL's text checker API fails is that the input element's
> value change (from JS) does not invoke spell checker (unless user starts
> typing manually).
> 
> FAIL:
> document.getElementById("spellTest").value =
> "TextThatShouldBeMarkedAsMisspelled ";
> 
> PASS:
> document.execCommand("InsertText", false,
> "TextThatShouldBeMarkedAsMisspelled ");
> 
> Ryosuke, is it ok that we omit spellchecking for programmatically
> input.value changes? It seems that it worked as those tests were passing
> (can not find revision as it was long time ago).
> 
> FYI, Safari, Chrome EFL's MiniBrowser does not trigger spellcecking for
> input.value changes.

Created a separate bug for this issue as it looks like cross platform one (bug 139473).
Comment 4 Grzegorz Czajkowski 2014-12-10 02:52:17 PST
Created attachment 243003 [details]
Patch
Comment 5 WebKit Commit Bot 2014-12-10 04:59:28 PST
Comment on attachment 243003 [details]
Patch

Clearing flags on attachment: 243003

Committed r177057: <http://trac.webkit.org/changeset/177057>
Comment 6 WebKit Commit Bot 2014-12-10 04:59:32 PST
All reviewed patches have been landed.  Closing bug.