TestRunner should allow callback for certain spellchecking events |
|||||
Issue descriptionCurrently, spell-checking layout tests has no way to know whether spellchecking is done or not, other than by just setting a timeout and wait, which is inefficient and error-prone. We want the test runner to invoke callbacks at the following timings: 1. SpellCheckClient::requestCheckingOfText is just called. This is the timing when a SpellCheckRequest is invoked but hasn't been processed. Two layout tests requires operations at this timing: - spellcheck-queue.html - spellcheck-async-mutation.html 2. SpellCheckClient has called didFinish/CancelCheckingText of a WebTextCheckingCompletion and returned. This is the timing when a SpellCheckRequest finishes and the result has been processed. All layout tests need it.
,
Dec 19 2016
,
Dec 20 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5fe2c6a2c0339de9ad318841e26df0bde9754eff commit 5fe2c6a2c0339de9ad318841e26df0bde9754eff Author: xiaochengh <xiaochengh@chromium.org> Date: Tue Dec 20 06:11:56 2016 Allow test runner to run a callback when finishing a spellcheck request This patch adds a new method setSpellCheckResolvedCallback to test runner, so that layout tests can run script when a spell check request is resolved, which can be used to inspect spelling markers in a better manner. It also adds removeSpellCheckResolvedCallback for clearing a previously set callback. Currently layout tests can only set a timeout to wait for markers to appear. Follow-up patches will utilize this new method in layout tests. BUG= 674819 Review-Url: https://codereview.chromium.org/2587823003 Cr-Commit-Position: refs/heads/master@{#439725} [modify] https://crrev.com/5fe2c6a2c0339de9ad318841e26df0bde9754eff/components/test_runner/spell_check_client.cc [modify] https://crrev.com/5fe2c6a2c0339de9ad318841e26df0bde9754eff/components/test_runner/spell_check_client.h [modify] https://crrev.com/5fe2c6a2c0339de9ad318841e26df0bde9754eff/components/test_runner/test_runner.cc [modify] https://crrev.com/5fe2c6a2c0339de9ad318841e26df0bde9754eff/components/test_runner/test_runner.h
,
Dec 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2637c3534065de0f8271f185272543211d690113 commit 2637c3534065de0f8271f185272543211d690113 Author: xiaochengh <xiaochengh@chromium.org> Date: Wed Dec 21 08:06:42 2016 Minor fixes to spellcheck_test This patch fixes some minor issues in spellcheck_test: 1. For each spellcheck_test, the creation of its |Test| object is advanced to prevent testharness from terminating too early. 2. Even if a test fails, its sample is still removed as long as we are running tests, so that its sample does not affect visibility of other tests. This reduces flakiness with idle time spell checker tests because it relies on visibility. 3. When a test finishes, |spellcheckTestRunning| is set back to |false| after the test's callback is run. This prevents two tests from running in parallel. This patch is also a preparation for crrev.com/2590823006. BUG= 674819 Review-Url: https://codereview.chromium.org/2591023003 Cr-Commit-Position: refs/heads/master@{#440049} [modify] https://crrev.com/2637c3534065de0f8271f185272543211d690113/third_party/WebKit/LayoutTests/editing/spelling/spellcheck_test.js
,
Dec 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d54cef0fcd7ce30563f7abcd07a80b0958d7e504 commit d54cef0fcd7ce30563f7abcd07a80b0958d7e504 Author: xiaochengh <xiaochengh@chromium.org> Date: Wed Dec 21 08:59:20 2016 Get rid of verify-with-timeout in spellcheck_test For spell-checking layout tests, marker verification used to be setting a timeout and wait. This patch utilizes testRunner.setSpellCheckResolvedCallback, and if no new marker is expected (in which case there might be no request), testRunner.runIdleTasks, to reduce futile waiting. We expect to see spell-checking tests run faster after this patch. BUG= 674819 Review-Url: https://codereview.chromium.org/2590823006 Cr-Commit-Position: refs/heads/master@{#440058} [modify] https://crrev.com/d54cef0fcd7ce30563f7abcd07a80b0958d7e504/third_party/WebKit/LayoutTests/editing/spelling/spellcheck_test.js
,
Dec 21 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e2c58f5f2da94a216531ab511f1f77da8037b428 commit e2c58f5f2da94a216531ab511f1f77da8037b428 Author: xiaochengh <xiaochengh@chromium.org> Date: Wed Dec 21 10:23:38 2016 Revert of Get rid of verify-with-timeout in spellcheck_test (patchset #3 id:40001 of https://codereview.chromium.org/2590823006/ ) Reason for revert: Introducing flakiness to WebKit Linux Trusty Leak: http://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=webkit_tests&tests=editing%2Fspelling Original issue's description: > Get rid of verify-with-timeout in spellcheck_test > > For spell-checking layout tests, marker verification used to be setting > a timeout and wait. This patch utilizes > testRunner.setSpellCheckResolvedCallback, and if no new marker is expected > (in which case there might be no request), testRunner.runIdleTasks, to > reduce futile waiting. > > We expect to see spell-checking tests run faster after this patch. > > BUG= 674819 > > Committed: https://crrev.com/d54cef0fcd7ce30563f7abcd07a80b0958d7e504 > Cr-Commit-Position: refs/heads/master@{#440058} TBR=tkent@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG= 674819 Review-Url: https://codereview.chromium.org/2593933003 Cr-Commit-Position: refs/heads/master@{#440068} [modify] https://crrev.com/e2c58f5f2da94a216531ab511f1f77da8037b428/third_party/WebKit/LayoutTests/editing/spelling/spellcheck_test.js
,
Dec 21 2016
,
Feb 1 2017
,
Apr 27 2017
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by xiaoche...@chromium.org
, Dec 16 2016