Commit Graph

43 Commits

Author SHA1 Message Date
Benjamin Otte
300a88922e build: Disable gcc warnings as warnings, too
We use -Werror in the build, so even if some warnings are just warnings,
they'd be errors.
2021-11-15 15:35:10 +01:00
Emmanuele Bassi
99e0929d6c build: Use a consistent style for Meson files 2020-12-15 12:46:59 +00:00
Emmanuele Bassi
0af6630521 a11y: Consolidate accessibility environment variables
Use a single environment variable for everything:

 - select the ATContext implementation
 - select the test ATContext
 - disable ATContext entirely

We use the same pattern as GSK_RENDERER, GTK_DEBUG, etc.

The documentation needs to be updated to include the environment
variable.
2020-11-09 16:21:49 +00:00
Matthias Clasen
37d4932b31 a11y: Add more tests
Test some of the attributes that GTK maintains
for every widget.
2020-10-25 19:29:00 -04:00
Matthias Clasen
93481e6c2e a11y: Add tests for GtkFlowBox
Test that roles, states and properties are as expected.
2020-10-20 01:12:20 -04:00
Matthias Clasen
b9e9898212 a11y: Add tests for GtkListBox
Test that roles, states and properties are as expected.
2020-10-20 01:07:13 -04:00
Matthias Clasen
7c47b6907b a11y: Add tests for GtkStack and GtkStackSwitcher
Test that the roles, states and relations are
as expected.
2020-10-20 00:46:07 -04:00
Matthias Clasen
abf8cbeaea a11y: Set an accessible role for GtkLevelBar
Use the 'meter' role for GtkLevelBar, and set the
appropriate properties.

Update the docs and add a test.
2020-07-29 22:46:00 -04:00
Matthias Clasen
c0de580d46 a11y: Set an accessible role for GtkExpander
Use the button accessible role for GtkExpander
and set attributes as appropriate.

Update the documentation and add a test.
2020-07-29 22:46:00 -04:00
Matthias Clasen
c68fe1053a a11y: Set an accessible role for GtkTextView
Use the text-box accessible role for GtkTextView
and set properties as appropriate.

Update the documentation and add a test.
2020-07-29 22:46:00 -04:00
Matthias Clasen
1755e07af7 a11y: Set an accessible role for GtkPasswordEntry
Use the text-box accessible role for GtkPasswordEntry.
And set properties as appropriate.

Update the documentation and add a test.
2020-07-28 18:23:57 -04:00
Matthias Clasen
a610bb89a0 a11y: Set an accessible role for GtkSearchEntry
Use the searchbox accessible role for GtkSearchEntry.
And set properties as appropriate.

Update the documentation and add a test.
2020-07-28 18:16:37 -04:00
Matthias Clasen
cc35cc6c4e a11y: Add tests for mnemonics
We set up labelled-by accessible relations when
a label is set as mnemonic widget. Verify that that
happens as expected.
2020-07-28 18:16:37 -04:00
Matthias Clasen
9a82aadca7 a11y: Set an accessible role for GtkEntry
Use the text-box accessible role for GtkEntry and
set the placeholder and read-only accessible properties.

Update the documentation and add tests.
2020-07-28 18:16:37 -04:00
Matthias Clasen
efd4169fa2 a11y: Set accessible roles for GtkImage and GtkPicture
Use the img accessible role for these.
Also update the documentation and add tests.
2020-07-28 18:16:37 -04:00
Matthias Clasen
6e494b93ce a11y: Add spinbutton tests
Tests the fix in the previous commit.
2020-07-27 21:18:10 -04:00
Matthias Clasen
9190e95df9 a11y: Add scrollbar tests
Tests the fix in the previous commit.
2020-07-27 21:18:10 -04:00
Matthias Clasen
d2c5e3f2b3 a11y: Add switch tests
Tests the fix in the previous commit.
2020-07-27 21:18:10 -04:00
Matthias Clasen
2cbaa568b5 a11y: Add separator tests
Tests the fix in the previous commit.
2020-07-27 21:18:10 -04:00
Matthias Clasen
606daab475 a11y: Add progressbar tests
Test the changes in the previous commit.
2020-07-27 21:18:10 -04:00
Matthias Clasen
d3a8597a93 a11y: Add dialog and window tests
Tests the modal property changes in the previous commit.
2020-07-27 21:18:10 -04:00
Matthias Clasen
6ca245306b a11y: Add checkbutton tests
Tests the fix in the previous commit.
2020-07-27 21:18:09 -04:00
Matthias Clasen
6c4c93b8d0 Add some more a11y tests
Add some tests that exercise the accessible machinery
without any connection to widgets.
2020-07-27 01:13:16 -04:00
Emmanuele Bassi
ac0fcc55a6 a11y: Add a simple test case for GtkButton's accessible state 2020-07-26 21:27:03 +01:00
Emmanuele Bassi
83eac3f33a a11y: Restart the accessibility test suite 2020-07-26 20:49:08 +01:00
Emmanuele Bassi
c63087a563 Remove ATK
To build a better world sometimes means having to tear the old one down.
        -- Alexander Pierce, "Captain America: The Winter Soldier"

ATK served us well for nearly 20 years, but the world has changed, and
GTK has changed with it. Now ATK is mostly a hindrance towards improving
the accessibility stack:

 - it maps to a very specific implementation, AT-SPI, which is Linux and
   Unix specific
 - it requires implementing the same functionality in three different
   layers of the stack: AT-SPI, ATK, and GTK
 - only GTK uses it; every other Linux and Unix toolkit and application
   talks to AT-SPI directly, including assistive technologies

Sadly, we cannot incrementally port GTK to a new accessibility stack;
since ATK insulates us entirely from the underlying implementation, we
cannot replace it piecemeal. Instead, we're going to remove everything
and then incrementally build on a clean slate:

 - add an "accessible" interface, implemented by GTK objects directly,
   which describe the accessible role and state changes for every UI
   element
 - add an "assistive technology context" to proxy a native accessibility
   API, and assign it to every widget
 - implement the AT context depending on the platform

For more information, see: https://gitlab.gnome.org/GNOME/gtk/-/issues/2833
2020-07-26 20:31:14 +01:00
Timm Bäder
14c3bc542d tetsuite/a11y: Pass common_cflags to build 2020-05-19 08:32:33 +02:00
Matthias Clasen
509db01319 tests: Centralize our test setup a bit
Put all of the constant environment into the
toplevel meson.build file, to reduce repetition
and copy-paste errors.
2020-05-15 14:11:53 -04:00
Matthias Clasen
cbb0ca4902 testsuite: Tell meson we use TAP
This makes meson actually parse the individual test
results. Most of the time, it does not make a difference,
but one case where it does is when all the individual
tests of a binary are skipped, meson will mark the
test as skipped.
2020-03-20 11:55:26 -04:00
Timm Bäder
e759358402 testsuite/a11y: Add common_cflags to build 2020-03-06 18:22:01 +01:00
Matthias Clasen
564a43cd3a Disable the buttons a11y test
The test fails because radio buttons are currently broken.
2020-02-10 15:06:56 -05:00
Matthias Clasen
048effdc5a testsuite: Clean up a11y menu tests
We don't need some of the tests anymore, since
we just have popovers now.
2020-02-06 17:21:06 -05:00
Alexander Larsson
a3be0ec5f0 Don't use xsettings or xft defaults in testsuite
This adds a GDK_DEBUG=default-settings flag which disables reads
from xsettings and Xft resources, and enables this for the testsuite.

This is one less way to get different testresults depending on the
environment. In particular, it was failing the css tests for me
due to getting the wrong font size because i have a different dpi.
2020-02-03 15:11:35 +01:00
Simon McVittie
a0d83bdfa7 testsuite: Install accessibility-dump executable alongside tests
The installed-tests want to run this.

Signed-off-by: Simon McVittie <smcv@debian.org>
2018-09-19 09:41:49 +01:00
Emmanuele Bassi
7bd5f8f69c tests: Split out the accessibility dump tests
Instead of having a single massive test running through the a11y
directory, we can split off each individual file into its own unit.

Having individual units has several advantages:

 - units are executed in parallel
 - it's easier to identify the failing units
 - logs for failed units are easier to read
2018-04-14 16:14:10 +01:00
Christoph Reiter
1253e7bfcb tests: Make GSETTINGS_SCHEMA_DIR point to the compiled schemas in the build dir
With autotools the schemas were compiled into each test suite directory
and the tests set GSETTINGS_SCHEMA_DIR to the test build directory.

With meson's gnome.compile_schemas() we can not define a target directory
so just make sure it is built in the gtk directory and set GSETTINGS_SCHEMA_DIR
to the gtk build directory when running the tests.

This makes the gtk+:gtk suite pass when no gtk is installed on the system.
2018-02-17 09:48:12 +01:00
Matthias Clasen
4a22704d82 Fix test environments 2017-10-18 17:30:20 +02:00
Matthias Clasen
b0b0095cf8 Test suite cosmetics
Reshuffle things a bit more, sort the test files into subdirectories,
and shorten their names.
2017-10-18 17:30:20 +02:00
Matthias Clasen
eb71cd195a testsuite: cosmetics
Put all tests in a suite, and order them in a nicer way.
This makes the test output look better.
2017-10-11 19:33:43 -05:00
Matthias Clasen
8c41365437 Reshuffle the a11y tests a bit 2017-10-10 00:16:31 -04:00
Timm Bäder
4fbe313cbc build: Remove wrong kwargs from a11y test()s
test() does not take install: or install_dir: kwargs.
2017-08-15 14:56:13 +02:00
Emmanuele Bassi
3ba514d31f build: Port the a11y test suite to Meson
Copy the location of the test data and binaries from the autotools
build, even though it's not really correct; currently we install the
test data under libexecdir, but it should live under datadir, and we
should use `G_TEST_DIST` to figure it out.

The `state` subdirectory is missing.
2017-05-03 15:15:17 +01:00
Timm Bäder
409ed21594 meson: Sort input files by name 2017-05-03 15:10:52 +01:00