|
|
DescriptionAllow 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
Committed: https://crrev.com/5fe2c6a2c0339de9ad318841e26df0bde9754eff
Cr-Commit-Position: refs/heads/master@{#439725}
Patch Set 1 #
Total comments: 5
Patch Set 2 : Tue Dec 20 12:44:34 JST 2016 #Patch Set 3 : fix typo... #
Messages
Total messages: 29 (17 generated)
The CQ bit was checked by xiaochengh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== Allow test runner to run a callback when finishing a spellcheck request BUG=674819 ========== to ========== 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. 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 ==========
xiaochengh@chromium.org changed reviewers: + tkent@chromium.org
PTAL.
tkent@chromium.org changed reviewers: + haraken@chromium.org
haraken, would you review code interacting with v8?
https://codereview.chromium.org/2587823003/diff/1/components/test_runner/spel... File components/test_runner/spell_check_client.cc (right): https://codereview.chromium.org/2587823003/diff/1/components/test_runner/spel... components/test_runner/spell_check_client.cc:158: frame->callFunctionEvenIfScriptDisabled( Is there any reason you want to run scripts when script execution is disabled? https://codereview.chromium.org/2587823003/diff/1/components/test_runner/test... File components/test_runner/test_runner.h (right): https://codereview.chromium.org/2587823003/diff/1/components/test_runner/test... components/test_runner/test_runner.h:89: blink::WebView* main_view() const { return main_view_; } Can you expose mainFrame() instead of main_view()?
Thanks for the review. https://codereview.chromium.org/2587823003/diff/1/components/test_runner/spel... File components/test_runner/spell_check_client.cc (right): https://codereview.chromium.org/2587823003/diff/1/components/test_runner/spel... components/test_runner/spell_check_client.cc:158: frame->callFunctionEvenIfScriptDisabled( On 2016/12/20 at 02:46:21, haraken wrote: > Is there any reason you want to run scripts when script execution is disabled? No specific reason. I just copied code from accessibility_controller.cc... If we want to use a safer function, what should it be? WebLocalFrame::requestExecuteV8Function? https://codereview.chromium.org/2587823003/diff/1/components/test_runner/test... File components/test_runner/test_runner.h (right): https://codereview.chromium.org/2587823003/diff/1/components/test_runner/test... components/test_runner/test_runner.h:89: blink::WebView* main_view() const { return main_view_; } On 2016/12/20 at 02:46:21, haraken wrote: > Can you expose mainFrame() instead of main_view()? Will do.
LGTM. On 2016/12/20 03:05:59, Xiaocheng wrote: > Thanks for the review. > > https://codereview.chromium.org/2587823003/diff/1/components/test_runner/spel... > File components/test_runner/spell_check_client.cc (right): > > https://codereview.chromium.org/2587823003/diff/1/components/test_runner/spel... > components/test_runner/spell_check_client.cc:158: > frame->callFunctionEvenIfScriptDisabled( > On 2016/12/20 at 02:46:21, haraken wrote: > > Is there any reason you want to run scripts when script execution is disabled? > > No specific reason. I just copied code from accessibility_controller.cc... > > If we want to use a safer function, what should it be? > WebLocalFrame::requestExecuteV8Function? Thanks, makes sense. Since your use case is only for testing, callFunctionEvenIfScriptDisabled will be okay. > > https://codereview.chromium.org/2587823003/diff/1/components/test_runner/test... > File components/test_runner/test_runner.h (right): > > https://codereview.chromium.org/2587823003/diff/1/components/test_runner/test... > components/test_runner/test_runner.h:89: blink::WebView* main_view() const { > return main_view_; } > On 2016/12/20 at 02:46:21, haraken wrote: > > Can you expose mainFrame() instead of main_view()? > > Will do.
lgtm
The CQ bit was checked by xiaochengh@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Sorry for my carelessness... There should be one more method for clearing the new callback. PTAL. https://codereview.chromium.org/2587823003/diff/1/components/test_runner/test... File components/test_runner/test_runner.h (right): https://codereview.chromium.org/2587823003/diff/1/components/test_runner/test... components/test_runner/test_runner.h:89: blink::WebView* main_view() const { return main_view_; } On 2016/12/20 at 03:05:59, Xiaocheng wrote: > On 2016/12/20 at 02:46:21, haraken wrote: > > Can you expose mainFrame() instead of main_view()? > > Will do. Done.
Description was changed from ========== 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. 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 ========== to ========== 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 ==========
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
On 2016/12/20 04:49:09, Xiaocheng wrote: > Sorry for my carelessness... There should be one more method for clearing the > new callback. lgtm
The CQ bit was checked by xiaochengh@chromium.org
Thanks for the review!
The patchset sent to the CQ was uploaded after l-g-t-m from haraken@chromium.org Link to the patchset: https://codereview.chromium.org/2587823003/#ps40001 (title: "fix typo...")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 40001, "attempt_start_ts": 1482214017880150, "parent_rev": "d8bb74ed11bf9e8d1ea0b4e3a96a55b8db3d1bb3", "commit_rev": "bdb5513340909eea60246627ef2547883f1352ca"}
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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 ==========
Message was sent while issue was closed.
Committed patchset #3 (id:40001)
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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 Committed: https://crrev.com/5fe2c6a2c0339de9ad318841e26df0bde9754eff Cr-Commit-Position: refs/heads/master@{#439725} ==========
Message was sent while issue was closed.
Patchset 3 (id:??) landed as https://crrev.com/5fe2c6a2c0339de9ad318841e26df0bde9754eff Cr-Commit-Position: refs/heads/master@{#439725} |