|
|
Chromium Code Reviews|
Created:
3 years, 9 months ago by oka Modified:
3 years, 5 months ago Reviewers:
CC:
chromium-reviews, sadrul, oshima+watch_chromium.org, oka+watchvk_chromium.org, yhanada+watchvk_chromium.org, kalyank, dfaden+virtualkb_google.com, groby+virtualkb_chromium.org Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionEnd to end test: async focus shouldn't trigger virtual keyboard.
BUG=703488
TESt=try
Patch Set 1 #Patch Set 2 : . #Patch Set 3 : . #Patch Set 4 : . #
Total comments: 6
Patch Set 5 : . #Patch Set 6 : . #Patch Set 7 : Rebased. #Patch Set 8 : Mark web_contents as protected. #Patch Set 9 : WIP #Patch Set 10 : Add chromeos TextInputTestHelper to BUILD.gn #Patch Set 11 : nit #Patch Set 12 : fix lint error #Patch Set 13 : fix lint error #Patch Set 14 : Rebase on top of another change. #Patch Set 15 : Clean up #Patch Set 16 : nit #Patch Set 17 : sync #Patch Set 18 : rebase #Patch Set 19 : Rebase #
Messages
Total messages: 47 (22 generated)
.
.
The CQ bit was checked by oka@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...
Description was changed from ========== End to end test: async focus shouldn't trigger virtual keyboard. ========== to ========== End to end test: async focus shouldn't trigger virtual keyboard. BUG=703488 TESt=try ==========
.
oka@chromium.org changed reviewers: + oshima@chromium.org
PTAL.
The CQ bit was checked by oka@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: Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_...)
The CQ bit was checked by oka@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.
Oshima-san friendly ping?
https://codereview.chromium.org/2771793002/diff/60001/chrome/browser/ui/ash/k... File chrome/browser/ui/ash/keyboard_end_to_end_browsertest.cc (right): https://codereview.chromium.org/2771793002/diff/60001/chrome/browser/ui/ash/k... chrome/browser/ui/ash/keyboard_end_to_end_browsertest.cc:71: // Initialized in |SetUpOnMainThread|. nit: private: and DISALLOW_COPY_AND_ASSIGN https://codereview.chromium.org/2771793002/diff/60001/chrome/test/data/chrome... File chrome/test/data/chromeos/virtual_keyboard/inputs.html (right): https://codereview.chromium.org/2771793002/diff/60001/chrome/test/data/chrome... chrome/test/data/chromeos/virtual_keyboard/inputs.html:16: // wait 200 ms to make sure virtual keyboard is hidden. it's not clear why we need this. Shouldn't keyboard already be hidden?
.
.
.
Mark web_contents as protected.
The CQ bit was checked by oka@chromium.org to run a CQ dry run
PTAL. https://codereview.chromium.org/2771793002/diff/60001/chrome/browser/ui/ash/k... File chrome/browser/ui/ash/keyboard_end_to_end_browsertest.cc (right): https://codereview.chromium.org/2771793002/diff/60001/chrome/browser/ui/ash/k... chrome/browser/ui/ash/keyboard_end_to_end_browsertest.cc:71: // Initialized in |SetUpOnMainThread|. On 2017/03/27 16:57:54, oshima wrote: > nit: > > private: > > and DISALLOW_COPY_AND_ASSIGN Done. https://codereview.chromium.org/2771793002/diff/60001/chrome/test/data/chrome... File chrome/test/data/chromeos/virtual_keyboard/inputs.html (right): https://codereview.chromium.org/2771793002/diff/60001/chrome/test/data/chrome... chrome/test/data/chromeos/virtual_keyboard/inputs.html:16: // wait 200 ms to make sure virtual keyboard is hidden. On 2017/03/27 16:57:54, oshima wrote: > it's not clear why we need this. Shouldn't keyboard already be hidden? Unfortunately no. The task to hide keyboard is delayed to avoid flickering when focus is moved from a text input to another text input. In this case text input type = NONE is sent to the keyboard controller once. If there is no delay, keyboard controller would close the keyboard for NONE and then reopens it. To avoid this, keyboard controller delays closing and cancels closing if a input element gets focus within 100 ms. Updated the test comment.
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: Try jobs failed on following builders: win_chromium_compile_dbg_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...)
https://codereview.chromium.org/2771793002/diff/60001/chrome/test/data/chrome... File chrome/test/data/chromeos/virtual_keyboard/inputs.html (right): https://codereview.chromium.org/2771793002/diff/60001/chrome/test/data/chrome... chrome/test/data/chromeos/virtual_keyboard/inputs.html:16: // wait 200 ms to make sure virtual keyboard is hidden. On 2017/03/28 11:13:26, oka wrote: > On 2017/03/27 16:57:54, oshima wrote: > > it's not clear why we need this. Shouldn't keyboard already be hidden? > > Unfortunately no. The task to hide keyboard is delayed to avoid flickering when > focus is moved from a text input to another text input. In this case text input > type = NONE is sent to the keyboard controller once. If there is no delay, > keyboard controller would close the keyboard for NONE and then reopens it. To > avoid this, keyboard controller delays closing and cancels closing if a input > element gets focus within 100 ms. Whey it reopens it? Shouldn't it stay hidden because setting focus async won't open keyboard? It looks odd if html code has to wait in order to avoid showing keyboard. > Updated the test comment.
https://codereview.chromium.org/2771793002/diff/60001/chrome/test/data/chrome... File chrome/test/data/chromeos/virtual_keyboard/inputs.html (right): https://codereview.chromium.org/2771793002/diff/60001/chrome/test/data/chrome... chrome/test/data/chromeos/virtual_keyboard/inputs.html:16: // wait 200 ms to make sure virtual keyboard is hidden. On 2017/03/28 12:00:25, oshima wrote: > On 2017/03/28 11:13:26, oka wrote: > > On 2017/03/27 16:57:54, oshima wrote: > > > it's not clear why we need this. Shouldn't keyboard already be hidden? > > > > Unfortunately no. The task to hide keyboard is delayed to avoid flickering > when > > focus is moved from a text input to another text input. In this case text > input > > type = NONE is sent to the keyboard controller once. If there is no delay, > > keyboard controller would close the keyboard for NONE and then reopens it. To > > avoid this, keyboard controller delays closing and cancels closing if a input > > element gets focus within 100 ms. > > Whey it reopens it? Shouldn't it stay hidden because setting focus async won't > open keyboard? > > It looks odd if html code has to wait in order to avoid showing keyboard. > > > Updated the test comment. > Sorry to make confusion, but in the previous comment "If there is no delay, keyboard controller would close the keyboard for NONE and then reopens it." the delay means the 100 ms of delay keyboard controller has. There are three states in virtual keyboard; shown, willHidden and hidden. Once NONE is received, keyboard moves to willHidden state and then it moves to hidden state after 100ms. If some text input element has focus before that keyboard moves to shown state. This is for preventing flickering. By this reason, if the keyboard is opening and then 'async' is clicked, keyboard will not be hidden otherwise the delay of 200ms is specified. If the keyboard is not opening when user clicks 'async', then the keyboard will not be shown even if there is no delay specified in setTimeout. That said, I agree that the test looks strange. Current test checks clicking 'async' hides *opening* keyboard, but it requires to add 200 ms of delay. Maybe we should change the strategy to check clicking async keeps keyboard closing. It will work if 200 is replaced with 0. Question for this approach is how to ckeck the keyboard is "still hidden". keyboard::WaitUntilHidden can't be used since there is not state change. We need a way to wait until input.focus() is called in the javascript side for the test to be meaningful.
On 2017/03/28 12:50:03, oka wrote: > https://codereview.chromium.org/2771793002/diff/60001/chrome/test/data/chrome... > File chrome/test/data/chromeos/virtual_keyboard/inputs.html (right): > > https://codereview.chromium.org/2771793002/diff/60001/chrome/test/data/chrome... > chrome/test/data/chromeos/virtual_keyboard/inputs.html:16: // wait 200 ms to > make sure virtual keyboard is hidden. > On 2017/03/28 12:00:25, oshima wrote: > > On 2017/03/28 11:13:26, oka wrote: > > > On 2017/03/27 16:57:54, oshima wrote: > > > > it's not clear why we need this. Shouldn't keyboard already be hidden? > > > > > > Unfortunately no. The task to hide keyboard is delayed to avoid flickering > > when > > > focus is moved from a text input to another text input. In this case text > > input > > > type = NONE is sent to the keyboard controller once. If there is no delay, > > > keyboard controller would close the keyboard for NONE and then reopens it. > To > > > avoid this, keyboard controller delays closing and cancels closing if a > input > > > element gets focus within 100 ms. > > > > Whey it reopens it? Shouldn't it stay hidden because setting focus async won't > > open keyboard? > > > > It looks odd if html code has to wait in order to avoid showing keyboard. > > > > > Updated the test comment. > > > > Sorry to make confusion, but in the previous comment > "If there is no delay, keyboard controller would close the keyboard for NONE and > then reopens it." > the delay means the 100 ms of delay keyboard controller has. > > There are three states in virtual keyboard; shown, willHidden and hidden. > Once NONE is received, keyboard moves to willHidden state and then it moves to > hidden state after 100ms. If some text input element has focus before that > keyboard moves to shown state. This is for preventing flickering. so my understanding was: [sync focused] --> shown --[move focus to async: emit NONE] --> willHidden -- 100ms --> hidden? [sync focused] --> shown --[move to another sync: emit NONE and SHOW?] --> willHiden + show --> shown am I wrong? > > By this reason, if the keyboard is opening and then 'async' is clicked, keyboard > will not be hidden otherwise the delay of 200ms is specified. > If the keyboard is not opening when user clicks 'async', then the keyboard will > not be shown even if there is no delay specified in setTimeout. > > That said, I agree that the test looks strange. Current test checks clicking > 'async' hides *opening* keyboard, but it requires to add 200 ms of delay. Maybe > we should change the strategy to check clicking async keeps keyboard closing. It > will work if 200 is replaced with 0. Question for this approach is how to ckeck > the keyboard is "still hidden". keyboard::WaitUntilHidden can't be used since > there is not state change. > We need a way to wait until input.focus() is called in the javascript side for > the test to be meaningful.
Your understanding is correct. 2017年3月30日(木) 13:23 <oshima@chromium.org>: > On 2017/03/28 12:50:03, oka wrote: > > > > https://codereview.chromium.org/2771793002/diff/60001/chrome/test/data/chrome... > > File chrome/test/data/chromeos/virtual_keyboard/inputs.html (right): > > > > > > https://codereview.chromium.org/2771793002/diff/60001/chrome/test/data/chrome... > > chrome/test/data/chromeos/virtual_keyboard/inputs.html:16: // wait 200 > ms to > > make sure virtual keyboard is hidden. > > On 2017/03/28 12:00:25, oshima wrote: > > > On 2017/03/28 11:13:26, oka wrote: > > > > On 2017/03/27 16:57:54, oshima wrote: > > > > > it's not clear why we need this. Shouldn't keyboard already be > hidden? > > > > > > > > Unfortunately no. The task to hide keyboard is delayed to avoid > flickering > > > when > > > > focus is moved from a text input to another text input. In this case > text > > > input > > > > type = NONE is sent to the keyboard controller once. If there is no > delay, > > > > keyboard controller would close the keyboard for NONE and then > reopens it. > > To > > > > avoid this, keyboard controller delays closing and cancels closing > if a > > input > > > > element gets focus within 100 ms. > > > > > > Whey it reopens it? Shouldn't it stay hidden because setting focus > async > won't > > > open keyboard? > > > > > > It looks odd if html code has to wait in order to avoid showing > keyboard. > > > > > > > Updated the test comment. > > > > > > > Sorry to make confusion, but in the previous comment > > "If there is no delay, keyboard controller would close the keyboard for > NONE > and > > then reopens it." > > the delay means the 100 ms of delay keyboard controller has. > > > > There are three states in virtual keyboard; shown, willHidden and hidden. > > Once NONE is received, keyboard moves to willHidden state and then it > moves to > > hidden state after 100ms. If some text input element has focus before > that > > keyboard moves to shown state. This is for preventing flickering. > > so my understanding was: > > [sync focused] --> shown --[move focus to async: emit NONE] --> willHidden > -- > 100ms --> hidden? > > [sync focused] --> shown --[move to another sync: emit NONE and SHOW?] --> > willHiden + show --> shown > > am I wrong? > > > > > > By this reason, if the keyboard is opening and then 'async' is clicked, > keyboard > > will not be hidden otherwise the delay of 200ms is specified. > > If the keyboard is not opening when user clicks 'async', then the > keyboard > will > > not be shown even if there is no delay specified in setTimeout. > > > > That said, I agree that the test looks strange. Current test checks > clicking > > 'async' hides *opening* keyboard, but it requires to add 200 ms of delay. > Maybe > > we should change the strategy to check clicking async keeps keyboard > closing. > It > > will work if 200 is replaced with 0. Question for this approach is how to > ckeck > > the keyboard is "still hidden". keyboard::WaitUntilHidden can't be used > since > > there is not state change. > > We need a way to wait until input.focus() is called in the javascript > side for > > the test to be meaningful. > > > > https://codereview.chromium.org/2771793002/ > -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
On 2017/03/30 05:03:18, oka wrote: > Your understanding is correct. If so, what's the issue in simply waiting until it's hidden? > > 2017年3月30日(木) 13:23 <mailto:oshima@chromium.org>: > > > On 2017/03/28 12:50:03, oka wrote: > > > > > > > > https://codereview.chromium.org/2771793002/diff/60001/chrome/test/data/chrome... > > > File chrome/test/data/chromeos/virtual_keyboard/inputs.html (right): > > > > > > > > > > > https://codereview.chromium.org/2771793002/diff/60001/chrome/test/data/chrome... > > > chrome/test/data/chromeos/virtual_keyboard/inputs.html:16: // wait 200 > > ms to > > > make sure virtual keyboard is hidden. > > > On 2017/03/28 12:00:25, oshima wrote: > > > > On 2017/03/28 11:13:26, oka wrote: > > > > > On 2017/03/27 16:57:54, oshima wrote: > > > > > > it's not clear why we need this. Shouldn't keyboard already be > > hidden? > > > > > > > > > > Unfortunately no. The task to hide keyboard is delayed to avoid > > flickering > > > > when > > > > > focus is moved from a text input to another text input. In this case > > text > > > > input > > > > > type = NONE is sent to the keyboard controller once. If there is no > > delay, > > > > > keyboard controller would close the keyboard for NONE and then > > reopens it. > > > To > > > > > avoid this, keyboard controller delays closing and cancels closing > > if a > > > input > > > > > element gets focus within 100 ms. > > > > > > > > Whey it reopens it? Shouldn't it stay hidden because setting focus > > async > > won't > > > > open keyboard? > > > > > > > > It looks odd if html code has to wait in order to avoid showing > > keyboard. > > > > > > > > > Updated the test comment. > > > > > > > > > > Sorry to make confusion, but in the previous comment > > > "If there is no delay, keyboard controller would close the keyboard for > > NONE > > and > > > then reopens it." > > > the delay means the 100 ms of delay keyboard controller has. > > > > > > There are three states in virtual keyboard; shown, willHidden and hidden. > > > Once NONE is received, keyboard moves to willHidden state and then it > > moves to > > > hidden state after 100ms. If some text input element has focus before > > that > > > keyboard moves to shown state. This is for preventing flickering. > > > > so my understanding was: > > > > [sync focused] --> shown --[move focus to async: emit NONE] --> willHidden > > -- > > 100ms --> hidden? > > > > [sync focused] --> shown --[move to another sync: emit NONE and SHOW?] --> > > willHiden + show --> shown > > > > am I wrong? > > > > > > > > > > By this reason, if the keyboard is opening and then 'async' is clicked, > > keyboard > > > will not be hidden otherwise the delay of 200ms is specified. > > > If the keyboard is not opening when user clicks 'async', then the > > keyboard > > will > > > not be shown even if there is no delay specified in setTimeout. > > > > > > That said, I agree that the test looks strange. Current test checks > > clicking > > > 'async' hides *opening* keyboard, but it requires to add 200 ms of delay. > > Maybe > > > we should change the strategy to check clicking async keeps keyboard > > closing. > > It > > > will work if 200 is replaced with 0. Question for this approach is how to > > ckeck > > > the keyboard is "still hidden". keyboard::WaitUntilHidden can't be used > > since > > > there is not state change. > > > We need a way to wait until input.focus() is called in the javascript > > side for > > > the test to be meaningful. > > > > > > > > https://codereview.chromium.org/2771793002/ > > > > -- > You received this message because you are subscribed to the Google Groups > "Chromium-reviews" group. > To unsubscribe from this group and stop receiving emails from it, send an email > to mailto:chromium-reviews+unsubscribe@chromium.org.
nit
fix lint error
fix lint error
On 2017/07/06 23:38:19, oka wrote: > fix lint error is this ready to review?
Not yet. Sorry 2017年7月7日(金) 12:45 <oshima@chromium.org>: > On 2017/07/06 23:38:19, oka wrote: > > fix lint error > > is this ready to review? > > https://codereview.chromium.org/2771793002/ > -- You received this message because you are subscribed to the Google Groups "Chromium-reviews" group. To unsubscribe from this group and stop receiving emails from it, send an email to chromium-reviews+unsubscribe@chromium.org.
Description was changed from ========== End to end test: async focus shouldn't trigger virtual keyboard. BUG=703488 TESt=try ========== to ========== End to end test: async focus shouldn't trigger virtual keyboard. BUG=703488 TESt=try ==========
oka@chromium.org changed reviewers: - oshima@chromium.org
Rebase on top of another change.
Clean up
nit
rebase
The CQ bit was checked by oka@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: Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-...) chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_...) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
