Commit a57f4dbb authored by Evan Stade's avatar Evan Stade Committed by Commit Bot

Fix flakiness in CrosDisplayConfigTest

Clear touch screen devices after each test so that touch screen
configuration doesn't interfere with the next test's setup.
Specifically, having a touch screen device causes the virtual
keyboard to be enabled before Shell is done initializing.

Bug: 939177
Change-Id: I8e24cc9ab2f425cdc8d9a3b4d11b0a4e1fd6d9f4
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1507250Reviewed-by: default avatarJames Cook <jamescook@chromium.org>
Commit-Queue: Evan Stade <estade@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638690}
parent 9c429b6c
......@@ -39,6 +39,8 @@
#include "components/account_id/account_id.h"
#include "components/user_manager/user_names.h"
#include "mojo/public/cpp/bindings/map.h"
#include "services/ws/public/cpp/input_devices/input_device_client.h"
#include "services/ws/public/cpp/input_devices/input_device_client_test_api.h"
#include "services/ws/public/cpp/property_type_converters.h"
#include "services/ws/public/mojom/window_manager.mojom.h"
#include "services/ws/public/mojom/window_tree_constants.mojom.h"
......@@ -187,6 +189,10 @@ void AshTestBase::TearDown() {
// Some tests set an internal display id,
// reset it here, so other tests will continue in a clean environment.
display::Display::SetInternalDisplayId(display::kInvalidDisplayId);
// Tests can add devices, so reset the lists for future tests.
ws::InputDeviceClientTestApi().SetTouchscreenDevices({});
ws::InputDeviceClientTestApi().SetKeyboardDevices({});
}
// static
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment