qt5base-lts/tests/auto
Ivan Solovev 3b82c2d167 Fix tst_qaccessibility on Android
On Android we had 10 failing unit-tests in tst_qaccessibility

One of them was failing because on Android QMdiSubWindow is created
maximized by default, so we need to explicitly call showNormal() on
it before doing all the checks.

Other 9 were failing because we didn't get A11Y events when expected.
This is a bit more tricky.
On Android a11y state is not explicitly set by calling
QPlatformAccessibility::setActive(), there is another flag that is
controller from the Java side. It is set to 'true' only when some
of the a11y services are enabled on the device. The state of this
flag is queried during event processing, so a11y state can be reset
to false while we do QTest::qWait().
This logic is absolutely correct for real applications, but it is
a problem for the test case, because we can't easily enable a11y
services in the CI.
To overcome the issue in unit-tests, re-enable a11y before each test.
A more precise fix will require re-enabling it after every qWait() or
processEvents() call, but the current tests pass with such condition.

Fixes: QTBUG-87674
Pick-to: 6.3 6.2
Change-Id: I6f765bc6d3aaeaa19aba3a64473ea25e9cbdb0f8
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2022-02-25 13:52:33 +01:00
..
bic/data Add BC files for 6.2.0 2022-01-07 13:31:38 +00:00
cmake Bump version from 6.2.0 to 6.4.0 in tests as well 2022-01-31 17:20:06 +02:00
concurrent Fix memory leak in QtConcurrent::run when called with a NULL QThreadPool 2022-01-24 22:40:35 +01:00
corelib Core: Fix tests that did break because QProcess security fix 2022-02-24 09:49:52 +02:00
dbus tests: Remove unused SRCDIR defines 2021-08-17 12:41:57 +00:00
gui QGuiApplication: use translation-based layout direction unless explicitly set 2022-02-24 19:46:01 +01:00
guiapplauncher Move QStateMachine from QtCore to QtScxml 2020-08-24 20:10:25 +02:00
network tst_qnetworkcookiejar: Remove tests that rely on public suffix database format 2022-02-24 19:36:26 +01:00
opengl Remove the qmake project files 2021-01-07 15:32:28 +01:00
other Fix tst_qaccessibility on Android 2022-02-25 13:52:33 +01:00
printsupport QtBase: replace windows.h with qt_windows.h 2021-11-23 12:53:46 +08:00
shared Remove false Q_UNREACHABLE from shaping code 2021-02-03 09:44:44 +01:00
sql Add spaces round operators and at starts of comment texts 2022-02-17 15:51:31 +01:00
testlib CMake: Add BUILTIN_TESTDATA option to qt_internal_add_test 2022-02-11 21:54:44 +01:00
tools typeNameForCast: use add_pointer instead of string manipulation 2022-02-18 13:44:41 +01:00
widgets Fix tst_qformlayout::wrapping on Android 2022-02-24 23:41:14 +01:00
xml Activate tst_qdom for Android 2022-02-22 17:22:58 +01:00
CMakeLists.txt Don't build tests/auto/tools when cross-compiling 2021-10-07 08:03:40 +02:00
network-settings.h Replace QtTest headers with QTest 2020-12-22 15:20:30 +01:00