Commit Graph

689 Commits

Author SHA1 Message Date
Matthias Clasen
b541ad48d1 reftests: Enforce default settings
Set all settings to their default values, so we
are less dependent on the environment to be set
up just right. In particular, this fixes animations
being disabled when we happen to run in a vm.
2021-07-19 13:10:31 -04:00
Timm Bäder
25879ea37e scrolledwindow: Always add other scrollbar size...
... if we're not using indicators and the policy may be visible. Not
doing this if the policy may be invisible is incorrect as we need to
reserve the space anyway in case the scrolledwindow is allocated at
minimum size and the child size increases to show the scrollbar.
2021-04-19 14:43:01 -04:00
Matthias Clasen
a1757170da Fix a11y test results
The color palette change is reflected in the a11y dump
for the color chooser.
2020-11-07 22:40:41 -05:00
Matthias Clasen
aed01a338e Fix the flipping-icons test
Remove icons that no longer have an rtl variant
in Adwaita.

Fixes: #2561
2020-05-21 22:29:28 -04:00
Simon McVittie
c37bbb2641 Add miscellaneous unpackaged files to dist tarball
Various files are in git but not in dist tarballs. Some of them look
like potentially useful references for downstream distributors.

Signed-off-by: Simon McVittie <smcv@debian.org>
2020-04-08 13:43:28 +01:00
Matthias Clasen
41330b6c03 testsuite: Handle icontheme test better
Skip just the failing tests in release builds.
2020-03-13 16:31:33 +00:00
Emmanuele Bassi
aac214f1b0 testsuite/gtk: Add xfail tests
Some tests are expected to fail.

Some tests are expected to fail in non-debugging builds.

The icontheme test is the latter.
2020-03-13 16:30:06 +00:00
Emmanuele Bassi
a4e4b136c9 Update the list of tests that may fail
The update of the Docker image we use on our CI introduced changes in
the underlying platform, and that caused some reftests to fail.
2019-12-17 17:39:43 +00:00
Timm Bäder
25174154b9 reftests: Fix css-multi-state test
Properly unset theme CSS and use the right selector for the toggle
buttons.
2019-11-29 20:35:06 +09:00
Matthias Clasen
f737908d2f Fix a11y test output 2019-11-27 13:16:22 -05:00
Alexandr Miloslavskiy
1efb72210d Fix crash in parse_border()
The bug was introduced in commit:
	9b7640b8 by Benjamin Otte, 2012-03-26 17:24:02
	styleproperty: Make _gtk_style_property_parse_value() return a CssValue

In that commit, `values` changed from `GValue*` to `GtkCssValue**`,
but one `!G_IS_VALUE (&values[8])` was left untouched. As a result,
if `border` shorthand contains anything after color, it might crash,
depending on memory layout.

New test included.

Fixes: #751
2019-11-23 18:06:31 +01:00
Chun-wei Fan
36edb5fbf6 reftests: Fix building on Visual Studio
We need to mark the prototypes in the headers so that they get exported
properly from the reftest DLLs that we build, so that the reftest DLLs
and program will link properly.  Include gtk-reftest.h in
reftest-snapshot.c so that the compiler picks up the export directives
as needed.
2019-11-22 11:43:35 +08:00
Niklas Hambüchen
d5457d1b14 build: Don't hardcode shared_library() in meson.
Instead, use the standard library().
This is a meson best practice.

Fixes #2248.

Fixes -Ddefault_library=static not having any effect.

Cherry-Picked-From: bb9c07d8fe
2019-11-18 03:31:20 +01:00
Christoph Reiter
3c2b5cda74 meson: port installed tests and reftests
I couldn't get all reftests to work reliably, so the tests failing
on either CI or on my machine are skipped for now.

Installed tests are disabled by default and can be enabled with "-Dinstalled_tests=true"
2019-11-15 12:52:03 +01:00
Matthias Clasen
90dfff5901 Fix gtk-builder-tool tests 2019-09-03 22:34:36 -04:00
Matthias Clasen
17064928d2 Fix gtk-query-settings test 2019-09-03 22:34:36 -04:00
Matthias Clasen
e082414f0c Update a11y test results 2019-09-03 22:34:36 -04:00
Matthias Clasen
f8251a4da9 Add a test for reinserting action groups
This is reproducing a crash that was seen
in gnome-builder.
2019-06-23 20:49:57 -04:00
Matthias Clasen
cc282c00d2 Fix build with older GLib
Turns out g_strv_equal is recent.
2019-06-20 08:22:56 -04:00
Matthias Clasen
08f216e11f action muxer: Fix gtk_widget_get_action_group
The documentation for gtk_widget_get_action_group
and gtk_widget_list_prefixes states that both of
these operate on all the action groups that are
'available' to the widget.

Which means: they are meant to walk up the parent
muxer chain. So do that.

Add tests to verify the expected behavior.

Closes: https://gitlab.gnome.org/GNOME/gtk/issues/1396
2019-06-19 21:38:27 +00:00
Matthias Clasen
cb7c994e82 Update test output 2019-06-18 10:59:03 +00:00
Christoph Reiter
bd80b34ca8 meson: a11y tests: don't build testfocus.c, autotools doesn't dist it
And the resulting binary isn't used anyway
2019-06-17 22:16:44 +02:00
Christoph Reiter
f0038fad63 meson: a11y tests: don't test "menus.ui", autotools doesn't dist it 2019-06-17 22:15:25 +02:00
Christoph Reiter
94555371f5 meson: print disabled backends in the final build summary
It's easy to miss what's not getting build otherwise
2019-06-17 17:50:42 +00:00
Daniel Boles
3e3e89a3c1 testsuite/a11y/about: Fix exp. output per e56a9e6c
Commit e56a9e6ce5 fixing Issue
https://gitlab.gnome.org/GNOME/gtk/issues/686 changed what happens here,
for whatever reason, and there's apparently no notion of 'correctness'
to worry about, so just update the expected output to match and pass CI.

Close https://gitlab.gnome.org/GNOME/gtk/issues/1949#note_531709
2019-06-14 17:48:34 +01:00
Matthias Clasen
2957b86f72 Add a reftest for multiple font families
This tests that listing multiple font
families in the css font-family property
works as expected.
2019-05-03 16:38:22 -04:00
Chun-wei Fan
983e82b750 state-record.c: Include header for write()/close()
Avoid an "implicit declaration of ..." warning/error for using
close()/write().
2019-04-18 15:06:54 +08:00
Christoph Reiter
77c1424582 meson: add tools tests 2019-04-13 13:11:23 +02:00
Christoph Reiter
014320bfb0 meson: add a11y test 2019-04-13 12:49:27 +02:00
Chun-wei Fan
e96c6c40f8 testsuite/gtk/builder.c: Export the needed symbols
Those symbols need to be properly exported for Visual Studio builds for
things to work properly.  Fixes the test on Visual Studio builds.
2019-04-11 16:46:22 +02:00
Christoph Reiter
d52dad2042 autotools: dist all meson related build files 2019-04-11 16:45:36 +02:00
Christoph Reiter
fb083b6de2 tests: don't overwrite GSETTINGS_SCHEMA_DIR when running under meson
Under autotools the compiled schemas are in the build directory and with
meson they are in the root build dir. Avoid changing the autotools build for
now and add a special GTK_TEST_MESON env var which we can use to differentiate
the two.

See 1253e7bfcb for a similar fix on master.
2019-04-11 16:45:36 +02:00
Chun-wei Fan
7d0364a127 testsuite/gtk/stylecontext.c: Declare variables at top-of-block
This will ensure the code builds on pre-C99 compilers.
2019-04-11 16:45:36 +02:00
Nirbheek Chauhan
ead77a4628 meson: Cleanup tests and gdk testsuite 2019-04-11 16:45:36 +02:00
Philippe Normand
4eb2f297f1 meson: Disable --export-dynamic for clang
It doesn't seem to be supported, at least when compiling on macOS.
2019-04-11 16:45:36 +02:00
Nirbheek Chauhan
a4fe15d9f0 meson: Sync build files with master and update to 3.24 2019-04-11 16:45:27 +02:00
Chun-wei Fan
8caa937739 tests: Include system headers appropriately
Don't include unistd.h on Windows, and include the appropriate headers on
Windows as necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2019-04-11 16:40:33 +02:00
Nirbheek Chauhan
8ec004cc08 Import meson build files from an 3.22
Specifically, from 6dd6660c68
2019-04-11 16:40:33 +02:00
Matthias Clasen
2ceff6df9c Fix a11y tests 2019-03-12 14:31:49 -04:00
Matthias Clasen
df77965153 Update css node tests
The GtkSwitch now has two image nodes.
2019-02-05 09:33:37 -05:00
Matthias Clasen
c5d824d6c9 Update a11y test output 2019-01-13 22:06:51 -05:00
Mike Gorse
e9f527b328 A11y: Add support for AtkTableCell 2018-12-19 21:09:59 -05:00
Matthias Clasen
38edc38f21 Skip GdkPixbuf in default-value tests 2018-12-12 13:35:04 -05:00
Matthias Clasen
b26cdd6d27 Update some a11y test results 2018-12-12 13:35:04 -05:00
Matthias Clasen
9417389659 Update a11y test results
The color picker shows up here.
2018-07-31 02:06:46 +00:00
Bastien Nocera
5b527d6910 test: Fix compile-time warnings
testsuite/gtk/notify.c: In function ‘test_type’:
testsuite/gtk/notify.c:434:14: warning: assignment to ‘GObject *’ {aka ‘struct _GObject *’} from incompatible pointer type ‘GtkSettings *’ {aka ‘struct _GtkSettings *’} [-Wincompatible-pointer-types]
     instance = g_object_ref (gtk_settings_get_default ());
              ^
testsuite/gtk/notify.c:443:16: warning: assignment to ‘GObject *’ {aka ‘struct _GObject *’} from incompatible pointer type ‘GdkWindow *’ {aka ‘struct _GdkWindow *’} [-Wincompatible-pointer-types]
       instance = g_object_ref (gdk_window_new (NULL, &attributes, 0));
                ^
2018-07-21 14:55:30 +02:00
Iain Lane
2e5307daea defaultvalue: Ignore more style properties that Adwaita overrides
These broke once we switched away from Raleigh
2018-07-19 16:29:14 +01:00
Daniel Boles
b75b5e900a themes: Remove Raleigh
It has been extremely broken since the move to CSS gadgets/nodes, so
clearly no one is depending on it; nor does anyone seem to want to
resurrect it, and writing a Raleigh-inspired theme from scratch would be
faster if they did. So let's drop the dead weight from the build and lib

Now that we don't have Raleigh, the defaultvalue test has to be changed
to set Adwaita before checking the default values of style properties -
some of which Adwaita overrides in its CSS, meaning those would fail.
Not that it passed before anyway! But it does now after my other commit.

Note that I leave the last reference in gtk-zip.sh.in alone since that
hasn't been touched in 8 years and probably has plenty other problems...

Close https://gitlab.gnome.org/GNOME/gtk/issues/1187
2018-06-29 20:12:19 +01:00
Daniel Boles
ca4ec52c54 defaultvalue: Fix some very broken indentation
and while here, use the more typical : to separate the type and property
2018-06-29 19:57:06 +01:00
Daniel Boles
908d4f1d1f defaultvalue: Ignore property to actually pass
GtkFontChooserWidget:tweak-action gets set in init(), so we have to skip
testing that it is the default NULL for a GObject, or the test fails.
2018-06-29 18:57:43 +01:00