New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 849995 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Improve unit testing for virtual keyboard

Project Member Reported by shend@chromium.org, Jun 6 2018

Issue description

We can improve the existing unit tests for virtual keyboard by:
- Making tests as isolated as possible (e.g. only test what we need to)
- Requiring less set up (e.g. don't bring up entire stack just to test one method).
- Making classes easier to test (e.g. expose dependencies so they can be mocked, split up larger classes)
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jun 12 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/25402a958763d0614694b63465ccbbea33eac79d

commit 25402a958763d0614694b63465ccbbea33eac79d
Author: Darren Shen <shend@chromium.org>
Date: Tue Jun 12 02:36:29 2018

[VK] Clean up VirtualKeyboardRootWindowController tests a bit.

There's a few tests in VirtualKeyboardRootWindowController that really
just test VirtualKeyboardController and not the RootWindowController.
We move those unit tests to the VirtualKeyboardController unit tests
and clean up the tests a bit (e.g. naming, helper functions, test only
one thing).

These tests can still be improved by mocking out KeyboardController
(or even RootWindowController). We really just want to test that
VirtualKeyboardController picks the right display and tells
RootWindowController to move the right windows around.

Bug: 849995
Change-Id: I12eb08933e351f6f1b0d2ab0b8b48df5b3f78bb9
Reviewed-on: https://chromium-review.googlesource.com/1089594
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566285}
[modify] https://crrev.com/25402a958763d0614694b63465ccbbea33eac79d/ash/root_window_controller_unittest.cc
[modify] https://crrev.com/25402a958763d0614694b63465ccbbea33eac79d/ash/virtual_keyboard_controller.h
[modify] https://crrev.com/25402a958763d0614694b63465ccbbea33eac79d/ash/virtual_keyboard_controller_unittest.cc
[modify] https://crrev.com/25402a958763d0614694b63465ccbbea33eac79d/testing/buildbot/filters/mash.ash_unittests.filter

Project Member

Comment 2 by bugdroid1@chromium.org, Jun 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/73dfbb7545cd3b83015f242444db33aee969f3a5

commit 73dfbb7545cd3b83015f242444db33aee969f3a5
Author: Darren Shen <shend@chromium.org>
Date: Wed Jun 13 06:55:49 2018

[VK] Remove useless scoped keyboard enablers in unit test.

There are some keyboard settings that enable the virtual keyboard (e.g.
SetTouchKeyboardEnabled, SetAccessibilityKeyboardEnabled). When changing
these settings, the code must also Enable/Disable KeyboardController.
This is done every time in the real code so that we maintain an
invariant that KeyboardController is enabled iff one of those settings
is on.

In KeyboardControllerUnittest however, we Enable KeyboardController
in SetUp, but we don't update the corresponding settings there. Instead
we instantiate some helper classes that turns on those settings in each
test case. This is weird, as we'll always need to instantiate that class
to maintain the invariant, so we might as well do it in SetUp.

We get rid of the scoped helper classes and just turn on the setting
in SetUp.

Bug: 849995
Change-Id: I7d7b1bd751cb8894ff2d7a2554b6ae1f8db77bf9
Reviewed-on: https://chromium-review.googlesource.com/1098647
Reviewed-by: Yuichiro Hanada <yhanada@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#566740}
[modify] https://crrev.com/73dfbb7545cd3b83015f242444db33aee969f3a5/ui/keyboard/keyboard_controller_unittest.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Jun 14 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/3f9d89d97e976523dd1c0c4e0631af6e46e2e792

commit 3f9d89d97e976523dd1c0c4e0631af6e46e2e792
Author: Darren Shen <shend@chromium.org>
Date: Thu Jun 14 21:53:53 2018

[VK] Activate the keyboard in KeyboardControllerTest::SetUp.

We currently explicitly add the keyboard container to the root window
in each test case. We might as well do it in SetUp.

We also clean up the tests a bit. This will be helpful when we remove
the keyboard container.

Bug: 849995
Change-Id: I9c188b215bca62f3fd5fddc5478d898106a05a53
Reviewed-on: https://chromium-review.googlesource.com/1098741
Reviewed-by: Yuichiro Hanada <yhanada@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#567434}
[modify] https://crrev.com/3f9d89d97e976523dd1c0c4e0631af6e46e2e792/ui/keyboard/keyboard_controller_unittest.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Aug 3

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e506d0be666b07ac1004f72cd0a84f808a096b8e

commit e506d0be666b07ac1004f72cd0a84f808a096b8e
Author: Darren Shen <shend@chromium.org>
Date: Fri Aug 03 06:26:52 2018

[VK] Fix DisableOverscrollForImeWindow  to use overscrolling.

VirtualKeyboardAppWindowTest.DisableOverscrollForImeWindow tests that
we don't reduce the viewport size of IME related windows (like the
floating candidate window when you gesture type). However, the test
uses ShowKeyboard(true), which shows the locked keyboard. When the
locked keyboard appears, we don't overscroll. Rather, we reduce the
size of the work area, shrinking the actual size of the window. The
test still passes because shrinking the work area also shrinks the
viewport size.

This patch changes the test to use ShowKeyboard(false), which triggers
overscrolling. This matches the original intent of the test more
closely.

TBR=yhanada@chromium.org

Bug: 849995
Change-Id: Ifdbea75c5b84081fc67cd29e3af21f1984b4a4eb
Reviewed-on: https://chromium-review.googlesource.com/1160064
Reviewed-by: Darren Shen <shend@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#580461}
[modify] https://crrev.com/e506d0be666b07ac1004f72cd0a84f808a096b8e/chrome/browser/ui/ash/keyboard_controller_browsertest.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Sep 12

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c2929c2d1a9d3658519422e4c8767659273daad1

commit c2929c2d1a9d3658519422e4c8767659273daad1
Author: Darren Shen <shend@chromium.org>
Date: Wed Sep 12 00:33:49 2018

[VK] Remove useless ShowVirtualKeyboard call in browser test.

There is a call to ShowVirtualKeyboard in
DefaultKeyboardExtensionBrowserTest::GetKeyboardWebContents, which is
quite confusing, because the virtual keyboard should be showing up from
focus/clicking and not an explicit call.

I don't really know why that code is there (maybe it's to load the
extension). However, when --enable-virtual-keyboard flag is on, we
begin loading the extension anyway.

Bug: 849995
Change-Id: Icae6c405ccde304ece80456190802012e487ebc5
Reviewed-on: https://chromium-review.googlesource.com/1215432
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: Yuichiro Hanada <yhanada@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#590552}
[modify] https://crrev.com/c2929c2d1a9d3658519422e4c8767659273daad1/chrome/browser/chromeos/extensions/default_keyboard_extension_browser_test.cc
[modify] https://crrev.com/c2929c2d1a9d3658519422e4c8767659273daad1/chrome/browser/chromeos/extensions/default_keyboard_extension_browser_test.h

Project Member

Comment 6 by bugdroid1@chromium.org, Sep 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/995176bbfad810c7f723942bdf185a5015713cf6

commit 995176bbfad810c7f723942bdf185a5015713cf6
Author: Darren Shen <shend@chromium.org>
Date: Tue Sep 18 05:10:36 2018

[VK] Split existing end to end tests.

There are some existing keyboard "end to end" tests, where a web page
is loaded along with the open source keyboard extension. We refactor
the tests a bit so that different web pages can be used for different
tests and split/added a few more tests.

Bug: 849995
Change-Id: I87e41b8df3b2210a95e233a9bc9f789c9181b5b3
Reviewed-on: https://chromium-review.googlesource.com/1214971
Reviewed-by: Yuichiro Hanada <yhanada@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591945}
[modify] https://crrev.com/995176bbfad810c7f723942bdf185a5015713cf6/chrome/browser/ui/ash/keyboard_end_to_end_browsertest.cc
[rename] https://crrev.com/995176bbfad810c7f723942bdf185a5015713cf6/chrome/test/data/chromeos/virtual_keyboard/focus.html
[add] https://crrev.com/995176bbfad810c7f723942bdf185a5015713cf6/chrome/test/data/chromeos/virtual_keyboard/form.html
[modify] https://crrev.com/995176bbfad810c7f723942bdf185a5015713cf6/testing/buildbot/filters/chromeos.mash.fyi.browser_tests.filter
[modify] https://crrev.com/995176bbfad810c7f723942bdf185a5015713cf6/testing/buildbot/filters/chromeos.single_process_mash.browser_tests.filter
[modify] https://crrev.com/995176bbfad810c7f723942bdf185a5015713cf6/ui/keyboard/test/keyboard_test_util.cc
[modify] https://crrev.com/995176bbfad810c7f723942bdf185a5015713cf6/ui/keyboard/test/keyboard_test_util.h

Project Member

Comment 7 by bugdroid1@chromium.org, Sep 18

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fe6f6a01034538c924710c9527064076b4284751

commit fe6f6a01034538c924710c9527064076b4284751
Author: Darren Shen <shend@chromium.org>
Date: Tue Sep 18 08:26:40 2018

[VK] Add tests for changing various aspects of an input field.

Changing aspects of an input field while it is focused can have an
effect on the virtual keyboard. This patch adds some tests to prevent
regressions in such behaviour.

Bug: 849995
Change-Id: I9e865f8d4cfdb3eeb37c9410b3a1a688c78d6df4
Reviewed-on: https://chromium-review.googlesource.com/1227867
Reviewed-by: Yuichiro Hanada <yhanada@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#591971}
[modify] https://crrev.com/fe6f6a01034538c924710c9527064076b4284751/chrome/browser/ui/ash/keyboard_end_to_end_browsertest.cc
[modify] https://crrev.com/fe6f6a01034538c924710c9527064076b4284751/ui/keyboard/test/keyboard_test_util.cc
[modify] https://crrev.com/fe6f6a01034538c924710c9527064076b4284751/ui/keyboard/test/keyboard_test_util.h

Project Member

Comment 8 by bugdroid1@chromium.org, Sep 20

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/22a72b84ba6c065cb4da38c4f8167fc901004659

commit 22a72b84ba6c065cb4da38c4f8167fc901004659
Author: Darren Shen <shend@chromium.org>
Date: Thu Sep 20 23:56:18 2018

[VK] Add browser tests for navigation.

There are some rules for showing/hiding the virtual keyboard when
navigating to a new page / tab. Added some tests to make sure we don't
regress these scenarios.

Bug: 849995
Change-Id: I2fee098943b6073a0d1c1f8b86cdf1a3b35455e5
Reviewed-on: https://chromium-review.googlesource.com/1233097
Reviewed-by: Yuichiro Hanada <yhanada@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593007}
[modify] https://crrev.com/22a72b84ba6c065cb4da38c4f8167fc901004659/chrome/browser/ui/ash/keyboard_end_to_end_browsertest.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Sep 21

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/05351fa0205f30d2e401a310d68001be4743107a

commit 05351fa0205f30d2e401a310d68001be4743107a
Author: Taiju Tsuiki <tzik@chromium.org>
Date: Fri Sep 21 05:34:19 2018

Revert "[VK] Add browser tests for navigation."

This reverts commit 22a72b84ba6c065cb4da38c4f8167fc901004659.

Reason for revert:
KeyboardEndToEndFormTest.NavigateToNewPageWithAutoFocusShowsKeyboard
is failing on the bot. Logs are:
https://ci.chromium.org/p/chromium/builders/luci.chromium.ci/linux-chromeos-dbg/7919
https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8934817998655936048/+/steps/browser_tests/0/logs/KeyboardEndToEndFormTest.NavigateToNewPageWithAutoFocusShowsKeyboard/0

Original change's description:
> [VK] Add browser tests for navigation.
> 
> There are some rules for showing/hiding the virtual keyboard when
> navigating to a new page / tab. Added some tests to make sure we don't
> regress these scenarios.
> 
> Bug: 849995
> Change-Id: I2fee098943b6073a0d1c1f8b86cdf1a3b35455e5
> Reviewed-on: https://chromium-review.googlesource.com/1233097
> Reviewed-by: Yuichiro Hanada <yhanada@chromium.org>
> Commit-Queue: Darren Shen <shend@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#593007}

TBR=yhanada@chromium.org,shend@chromium.org

Change-Id: If842c48eea3a0e45b936a5b9ba3d47faeb21fb9f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 849995
Reviewed-on: https://chromium-review.googlesource.com/1237898
Reviewed-by: Taiju Tsuiki <tzik@chromium.org>
Commit-Queue: Taiju Tsuiki <tzik@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593086}
[modify] https://crrev.com/05351fa0205f30d2e401a310d68001be4743107a/chrome/browser/ui/ash/keyboard_end_to_end_browsertest.cc

Project Member

Comment 10 by bugdroid1@chromium.org, Sep 21

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/41f54cf3091455f53ae0ba8dc9ed868b46591a4f

commit 41f54cf3091455f53ae0ba8dc9ed868b46591a4f
Author: Darren Shen <shend@chromium.org>
Date: Fri Sep 21 07:39:41 2018

[VK] Add browser tests for overscrolling.

Add a new browser test for checking that a maximized window responds
correctly to the virtual keyboard.

Had to change how WaitUntilShown and WaitUntilHidden worked.
|WaitUntilShown| used to just wait for the window visibility to change,
but KeyboardController sets the window visiblity at the beginning of
the show animation. So |WaitUntilShown| was more like
"WaitUntilStartingToShow".

This was a problem because overscrolling occurred after the animation
finishes, so the tests have to wait for animations to finish.

We changed it to wait instead of the keyboard visiblity as dictated
by the KeyboardController. This visiblity gets updated when the
show animation finishes. Unfortunately this is not true for the
hide animation, but it doesn't really affect our tests since
overscrolling also happens at the beginning of the hide animation.

Also see crbug.com/866332 for more about the different types of
"visibility".

Bug: 849995
Change-Id: I9c9dbee9423b63db3df58814e59eb41a9cab2d90
Reviewed-on: https://chromium-review.googlesource.com/1233314
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: Yuichiro Hanada <yhanada@chromium.org>
Cr-Commit-Position: refs/heads/master@{#593105}
[modify] https://crrev.com/41f54cf3091455f53ae0ba8dc9ed868b46591a4f/chrome/browser/ui/ash/keyboard_end_to_end_browsertest.cc
[modify] https://crrev.com/41f54cf3091455f53ae0ba8dc9ed868b46591a4f/testing/buildbot/filters/chromeos.mash.fyi.browser_tests.filter
[modify] https://crrev.com/41f54cf3091455f53ae0ba8dc9ed868b46591a4f/testing/buildbot/filters/chromeos.single_process_mash.browser_tests.filter
[modify] https://crrev.com/41f54cf3091455f53ae0ba8dc9ed868b46591a4f/ui/keyboard/test/keyboard_test_util.cc
[modify] https://crrev.com/41f54cf3091455f53ae0ba8dc9ed868b46591a4f/ui/keyboard/test/keyboard_test_util.h

Project Member

Comment 11 by bugdroid1@chromium.org, Sep 26

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/761c3194cf9d76fe15e271c6645d09551178c322

commit 761c3194cf9d76fe15e271c6645d09551178c322
Author: Darren Shen <shend@chromium.org>
Date: Wed Sep 26 08:00:48 2018

[VK] Add more overscrolling tests and change overscroll behaviour.

This patch adds more overscrolling tests (scenarios involving a
non-maximised window). We found a race condition in the process:

When the keyboard overlaps with a non-maximised window, the keyboard
will try to move the window upwards (KeyboardUI::EnsureCaretInWorkArea).

However, in the following sequence of events, this will fail:
1. Test requests the virtual keyboard to show.
2. Virtual keyboard begins loading the keyboard extension.
3. Keyboard extension reports that it's "loaded", but it hasn't
   actually loaded of all UI yet.
4. Virtual keyboard begins to show, but because the extension
   hasn't fully loaded the UI, the keyboard bounds are still empty.
5. Keyboard extension finishes loading and resizes itself,
   causing the keyboard window bounds to resize as well and the
   keyboard is shown.

All of these steps are WAI, but during step 4, when the keyboard
shows with empty bounds, it won't attempt to move the window upwards
because the keyboard has empty bounds. When step 5 happens, we don't
actually call EnsureCaretInWorkArea again.

To fix this, we simply call EnsureCaretInWorkArea every time the
bounds of the virtual keyboard changes, instead of only when the
keyboard shows/hides.

This caused a reordering of some calls in HideKeyboard, so we also
had to change UpdateInsetsForWindow. Hard to explain here why the
change is needed.

Bug: 849995
Change-Id: Ibbf67a410e2b6ed16b9cfc03143fabdecfbe2ad1
Reviewed-on: https://chromium-review.googlesource.com/1233103
Reviewed-by: Yuichiro Hanada <yhanada@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#594245}
[modify] https://crrev.com/761c3194cf9d76fe15e271c6645d09551178c322/chrome/browser/ui/ash/chrome_keyboard_ui.cc
[modify] https://crrev.com/761c3194cf9d76fe15e271c6645d09551178c322/chrome/browser/ui/ash/keyboard_end_to_end_browsertest.cc
[modify] https://crrev.com/761c3194cf9d76fe15e271c6645d09551178c322/ui/keyboard/keyboard_controller.cc

Project Member

Comment 12 by bugdroid1@chromium.org, Nov 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ed0f2f84fa171ab4343c2eca93b86085b470349e

commit ed0f2f84fa171ab4343c2eca93b86085b470349e
Author: Darren Shen <shend@chromium.org>
Date: Wed Nov 07 06:44:25 2018

[VK] Automatically notify when test keyboard UI is loaded.

Previously, test implementations of KeyboardUI did not call
KeyboardController::NotifyKeyboardWindowLoaded. KeyboardController
requires that function to be called in order to proceed to show the
virtual keyboard. Thus, individual test files had to manually call
NotifyKeyboardWindowLoaded.

We change the test implementations to automatically call
NotifyKeyboardWindowLoaded (through a callback) and move the function
to be private. We use PostTask to simulate asynchronity.

Bug: 849995
Change-Id: I1eae9a94c785622ed645c2437a0457f5516fed47
Reviewed-on: https://chromium-review.googlesource.com/c/1277129
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#605980}
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/ash/app_list/app_list_presenter_delegate_unittest.cc
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/ash/keyboard/test_keyboard_ui.cc
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/ash/keyboard/virtual_keyboard_controller_unittest.cc
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/ash/keyboard/virtual_keyboard_unittest.cc
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/ash/login/ui/login_keyboard_test_base.cc
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/ash/root_window_controller_unittest.cc
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/ash/shelf/shelf_widget_unittest.cc
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/ash/system/status_area_widget_unittest.cc
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/ash/system/virtual_keyboard/virtual_keyboard_tray_unittest.cc
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/ash/wm/always_on_top_controller_unittest.cc
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/ash/wm/lock_action_handler_layout_manager_unittest.cc
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/ash/wm/lock_layout_manager_unittest.cc
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/ash/wm/overview/window_selector_controller_unittest.cc
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/ash/wm/pip/pip_positioner_unittest.cc
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/ash/wm/pip/pip_window_resizer_unittest.cc
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/ash/wm/system_modal_container_layout_manager_unittest.cc
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/ash/wm/workspace/workspace_layout_manager_unittest.cc
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/chrome/browser/ui/ash/keyboard_controller_browsertest.cc
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/testing/buildbot/filters/chromeos.single_process_mash.ash_unittests.filter
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/ui/keyboard/keyboard_controller.h
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/ui/keyboard/keyboard_controller_unittest.cc
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/ui/keyboard/keyboard_ui.h
[modify] https://crrev.com/ed0f2f84fa171ab4343c2eca93b86085b470349e/ui/keyboard/test/keyboard_test_util.cc

Project Member

Comment 13 by bugdroid1@chromium.org, Nov 7

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/faa9ab42532362e0246a456b82d28ec1dd99fe53

commit faa9ab42532362e0246a456b82d28ec1dd99fe53
Author: Findit <findit-for-me@appspot.gserviceaccount.com>
Date: Wed Nov 07 07:58:32 2018

Revert "[VK] Automatically notify when test keyboard UI is loaded."

This reverts commit ed0f2f84fa171ab4343c2eca93b86085b470349e.

Reason for revert:

Findit (https://goo.gl/kROfz5) identified CL at revision 605980 as the
culprit for failures in the build cycles as shown on:
https://findit-for-me.appspot.com/waterfall/culprit?key=ag9zfmZpbmRpdC1mb3ItbWVyRAsSDVdmU3VzcGVjdGVkQ0wiMWNocm9taXVtL2VkMGYyZjg0ZmExNzFhYjQzNDNjMmVjYTkzYjg2MDg1YjQ3MDM0OWUM

Sample Failed Build: https://ci.chromium.org/buildbot/chromium.chromiumos/linux-chromeos-rel/15725

Sample Failed Step: browser_tests

Original change's description:
> [VK] Automatically notify when test keyboard UI is loaded.
> 
> Previously, test implementations of KeyboardUI did not call
> KeyboardController::NotifyKeyboardWindowLoaded. KeyboardController
> requires that function to be called in order to proceed to show the
> virtual keyboard. Thus, individual test files had to manually call
> NotifyKeyboardWindowLoaded.
> 
> We change the test implementations to automatically call
> NotifyKeyboardWindowLoaded (through a callback) and move the function
> to be private. We use PostTask to simulate asynchronity.
> 
> Bug: 849995
> Change-Id: I1eae9a94c785622ed645c2437a0457f5516fed47
> Reviewed-on: https://chromium-review.googlesource.com/c/1277129
> Commit-Queue: Darren Shen <shend@chromium.org>
> Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
> Reviewed-by: James Cook <jamescook@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#605980}

Change-Id: I959fb6eede97135d784019240760184563de0b16
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 849995
Reviewed-on: https://chromium-review.googlesource.com/c/1322609
Cr-Commit-Position: refs/heads/master@{#605988}
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/ash/app_list/app_list_presenter_delegate_unittest.cc
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/ash/keyboard/test_keyboard_ui.cc
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/ash/keyboard/virtual_keyboard_controller_unittest.cc
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/ash/keyboard/virtual_keyboard_unittest.cc
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/ash/login/ui/login_keyboard_test_base.cc
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/ash/root_window_controller_unittest.cc
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/ash/shelf/shelf_widget_unittest.cc
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/ash/system/status_area_widget_unittest.cc
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/ash/system/virtual_keyboard/virtual_keyboard_tray_unittest.cc
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/ash/wm/always_on_top_controller_unittest.cc
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/ash/wm/lock_action_handler_layout_manager_unittest.cc
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/ash/wm/lock_layout_manager_unittest.cc
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/ash/wm/overview/window_selector_controller_unittest.cc
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/ash/wm/pip/pip_positioner_unittest.cc
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/ash/wm/pip/pip_window_resizer_unittest.cc
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/ash/wm/system_modal_container_layout_manager_unittest.cc
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/ash/wm/workspace/workspace_layout_manager_unittest.cc
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/chrome/browser/ui/ash/keyboard_controller_browsertest.cc
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/testing/buildbot/filters/chromeos.single_process_mash.ash_unittests.filter
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/ui/keyboard/keyboard_controller.h
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/ui/keyboard/keyboard_controller_unittest.cc
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/ui/keyboard/keyboard_ui.h
[modify] https://crrev.com/faa9ab42532362e0246a456b82d28ec1dd99fe53/ui/keyboard/test/keyboard_test_util.cc

Project Member

Comment 14 by bugdroid1@chromium.org, Nov 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5d7f5b4c1f5ea4fe0737889a1d47835547aba587

commit 5d7f5b4c1f5ea4fe0737889a1d47835547aba587
Author: Darren Shen <shend@chromium.org>
Date: Thu Nov 08 02:30:43 2018

Reland "[VK] Automatically notify when test keyboard UI is loaded."

This is a reland of ed0f2f84fa171ab4343c2eca93b86085b470349e

We changed a test to call WaitUntilShown before setting the size.

TBR=jamescook@chromium.org

Original change's description:
> [VK] Automatically notify when test keyboard UI is loaded.
>
> Previously, test implementations of KeyboardUI did not call
> KeyboardController::NotifyKeyboardWindowLoaded. KeyboardController
> requires that function to be called in order to proceed to show the
> virtual keyboard. Thus, individual test files had to manually call
> NotifyKeyboardWindowLoaded.
>
> We change the test implementations to automatically call
> NotifyKeyboardWindowLoaded (through a callback) and move the function
> to be private. We use PostTask to simulate asynchronity.
>
> Bug: 849995
> Change-Id: I1eae9a94c785622ed645c2437a0457f5516fed47
> Reviewed-on: https://chromium-review.googlesource.com/c/1277129
> Commit-Queue: Darren Shen <shend@chromium.org>
> Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
> Reviewed-by: James Cook <jamescook@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#605980}

Bug: 849995
Change-Id: I0af055fd0d47ec3969e110e9ef6cced089692446
Reviewed-on: https://chromium-review.googlesource.com/c/1324529
Reviewed-by: Darren Shen <shend@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606291}
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/ash/app_list/app_list_presenter_delegate_unittest.cc
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/ash/keyboard/test_keyboard_ui.cc
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/ash/keyboard/virtual_keyboard_controller_unittest.cc
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/ash/keyboard/virtual_keyboard_unittest.cc
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/ash/login/ui/login_keyboard_test_base.cc
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/ash/root_window_controller_unittest.cc
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/ash/shelf/shelf_widget_unittest.cc
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/ash/system/status_area_widget_unittest.cc
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/ash/system/virtual_keyboard/virtual_keyboard_tray_unittest.cc
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/ash/wm/always_on_top_controller_unittest.cc
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/ash/wm/lock_action_handler_layout_manager_unittest.cc
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/ash/wm/lock_layout_manager_unittest.cc
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/ash/wm/overview/window_selector_controller_unittest.cc
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/ash/wm/pip/pip_positioner_unittest.cc
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/ash/wm/pip/pip_window_resizer_unittest.cc
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/ash/wm/system_modal_container_layout_manager_unittest.cc
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/ash/wm/workspace/workspace_layout_manager_unittest.cc
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/chrome/browser/ui/ash/keyboard_controller_browsertest.cc
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/testing/buildbot/filters/chromeos.single_process_mash.ash_unittests.filter
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/ui/keyboard/keyboard_controller.h
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/ui/keyboard/keyboard_controller_unittest.cc
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/ui/keyboard/keyboard_ui.h
[modify] https://crrev.com/5d7f5b4c1f5ea4fe0737889a1d47835547aba587/ui/keyboard/test/keyboard_test_util.cc

Project Member

Comment 15 by bugdroid1@chromium.org, Nov 8

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/683a25acf797719d87d44f556532165364072f98

commit 683a25acf797719d87d44f556532165364072f98
Author: Darren Shen <shend@chromium.org>
Date: Thu Nov 08 23:11:08 2018

[VK] Automatically set default size for virtual keyboard on first load.

The virtual keyboard extension is responsible for choosing the size of
the keyboard window. In test code, we mock out the extension but we
don't set a size. This means that test code has to manually set the
bounds of the keyboard window, which is a bit weird. Failing to set
the size result in very confusing test failures too.

Therefore, we set a default virtual keyboard size in the test KeyboardUI
implementations. If test code need a specific size, they can always
resize the window themselves.

Bug: 849995
Change-Id: I3794f11719bcfe722317174d43492141e6f75b80
Reviewed-on: https://chromium-review.googlesource.com/c/1278462
Commit-Queue: Darren Shen <shend@chromium.org>
Reviewed-by: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: James Cook <jamescook@chromium.org>
Cr-Commit-Position: refs/heads/master@{#606642}
[modify] https://crrev.com/683a25acf797719d87d44f556532165364072f98/ash/BUILD.gn
[modify] https://crrev.com/683a25acf797719d87d44f556532165364072f98/ash/app_list/app_list_presenter_delegate_unittest.cc
[modify] https://crrev.com/683a25acf797719d87d44f556532165364072f98/ash/keyboard/test_keyboard_ui.cc
[modify] https://crrev.com/683a25acf797719d87d44f556532165364072f98/ash/keyboard/virtual_keyboard_controller_unittest.cc
[modify] https://crrev.com/683a25acf797719d87d44f556532165364072f98/ash/keyboard/virtual_keyboard_unittest.cc
[modify] https://crrev.com/683a25acf797719d87d44f556532165364072f98/ash/login/ui/login_keyboard_test_base.cc
[modify] https://crrev.com/683a25acf797719d87d44f556532165364072f98/ash/magnifier/magnification_controller_unittest.cc
[modify] https://crrev.com/683a25acf797719d87d44f556532165364072f98/ash/root_window_controller_unittest.cc
[modify] https://crrev.com/683a25acf797719d87d44f556532165364072f98/ash/wm/always_on_top_controller_unittest.cc
[modify] https://crrev.com/683a25acf797719d87d44f556532165364072f98/ash/wm/lock_action_handler_layout_manager_unittest.cc
[modify] https://crrev.com/683a25acf797719d87d44f556532165364072f98/ash/wm/lock_layout_manager_unittest.cc
[modify] https://crrev.com/683a25acf797719d87d44f556532165364072f98/ash/wm/overview/window_selector_controller_unittest.cc
[modify] https://crrev.com/683a25acf797719d87d44f556532165364072f98/ash/wm/system_modal_container_layout_manager_unittest.cc
[modify] https://crrev.com/683a25acf797719d87d44f556532165364072f98/ash/wm/workspace/workspace_layout_manager_unittest.cc
[modify] https://crrev.com/683a25acf797719d87d44f556532165364072f98/ui/keyboard/BUILD.gn
[modify] https://crrev.com/683a25acf797719d87d44f556532165364072f98/ui/keyboard/keyboard_controller.cc
[modify] https://crrev.com/683a25acf797719d87d44f556532165364072f98/ui/keyboard/keyboard_controller_unittest.cc
[modify] https://crrev.com/683a25acf797719d87d44f556532165364072f98/ui/keyboard/test/keyboard_test_util.cc
[modify] https://crrev.com/683a25acf797719d87d44f556532165364072f98/ui/keyboard/test/keyboard_test_util.h

Labels: Hotlist-DesktopUIToolingRequired Hotlist-DesktopUIChecked
Mass UI Triage.
Project Member

Comment 17 by bugdroid1@chromium.org, Nov 29

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fec5f64b6bd269535e296228d17aa0381d00483a

commit fec5f64b6bd269535e296228d17aa0381d00483a
Author: Darren Shen <shend@chromium.org>
Date: Thu Nov 29 00:50:55 2018

[VK] Simplify KeyboardBoundsFromRootBounds.

Follow up to r1278462.

TBR=stevenjb@chromium.org

Bug: 849995
Change-Id: I35d0e1e64149e5b71b3da409a7ade18995039854
Reviewed-on: https://chromium-review.googlesource.com/c/1353060
Reviewed-by: Darren Shen <shend@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611969}
[modify] https://crrev.com/fec5f64b6bd269535e296228d17aa0381d00483a/ui/keyboard/test/keyboard_test_util.cc
[modify] https://crrev.com/fec5f64b6bd269535e296228d17aa0381d00483a/ui/keyboard/test/keyboard_test_util.h

Sign in to add a comment