Commit Graph

675 Commits

Author SHA1 Message Date
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
Daniel Boles
62573f299c defaultvalue: Stop warnings via new g_object_ref()
Now that it can propagate the type, we must explicitly cast to GObject*
to assign it, otherwise gcc shouts.
2018-06-29 18:46:09 +01:00
Daniel Boles
c0bf48c8ab defaultvalue test: Remove obsolete properties 2018-06-29 18:46:09 +01:00
Christoph Reiter
c60ea284c5 testsuite/a11y: Fix missing glib schemas
The a11y tests complain that org.gtk.Settings schemas are missing
and fail. This copies the code to build and include the schemas from
the reftests testsuite.
2018-02-15 12:30:57 +01:00
Matthias Clasen
5b19d6b1b8 Add a test for ::row-changed vs node refs
Test that filter models propagate ::row-changed if there is
an external reference on the node, and not otherwise. This
is showing up in buggy icon view behaviour, where the icon
view is not redrawing if the content changes in a model that
is below a filter model.
2018-01-19 16:05:51 +01:00
Matthias Clasen
53bc2566b3 tree model sort: Fix set_sort_column
We were failing to change the sort order for the
default sort column in some cases. Fix that, and
add a testcase for this issue.

https://bugzilla.gnome.org/show_bug.cgi?id=792459

Add a testcase for the previous fix
2018-01-16 18:19:10 -05:00
Debarshi Ray
a827e92226 GtkBuilder: Prefer "type-func" over "class" when looking for the GType
https://bugzilla.gnome.org/show_bug.cgi?id=786932
2017-08-29 15:42:56 +02:00
Matthias Clasen
448d76b8e8 update expected test results 2017-07-18 22:55:39 -04:00
Matthias Clasen
1a6ccd1b0a Update a11y tests
Expected output of a11y tests has changed.
2017-06-20 15:16:19 -04:00
Daniel Boles
2aa4248e8f testsuite/scrolledwindow: Try non-overlay/non-auto
It was only testing the default configuration, where overlay scrolling
is on and both scrollbars use POLICY_AUTOMATIC. We should also test the
other 3 configurations that are available by including non-overlay
scrollbars and/or those that use POLICY_ALWAYS.

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-06-02 19:36:06 +01:00
Emmanuele Bassi
dc471fa258 build: Enable subdir-objects
Like we did in the master branch.

Using subdir-objects removes the forward compatibility warnings coming
from autotools.
2017-05-09 14:19:51 +01:00
Daniel Boles
188929e2ea Revert "testsuite/scrolledwindow—Test non-overlay/non-auto"
This reverts commit fbd876fe93.

Reverting until I can be sure gtkscrolledwindow.c does the right thing.

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-02-22 19:32:32 +00:00
Daniel Boles
fbd876fe93 testsuite/scrolledwindow—Test non-overlay/non-auto
It was only testing the default configuration where overlay-scrolling is
TRUE and the policy is POLICY_AUTOMATIC. We should also test FALSE and
POLICY_ALWAYS. This commit adds those tests and makes the !overlay &&
POLICY_ALWAYS case pass by excluding the size of the relevant scrollbar,
as we are only interested in whether the content size is as requested.

https://bugzilla.gnome.org/show_bug.cgi?id=778853
2017-02-19 12:48:22 +00:00
Daniel Boles
a6ba8df4b7 testsuite/gtk/textiter: Add missing assertion
gboolean ret for whether gtk_text_iter_backward_line() moved the iter
was declared but not used anywhere. I presume it was meant to be
checked, and it passes now, so let’s do it.
2017-02-18 20:18:05 +00:00
Nelson Benítez León
c4874aeaa5 textiter: fix bug in gtk_text_iter_backward_line()
gtk_text_iter_backward_line() checks the value of
real->line_char_offset without previously calling
ensure_char_offsets (real) to make sure the former
is up-to-date.

As a consequence of this, when gtk_text_iter_backward_line()
is called after a gtk_text_buffer_insert_range() in the
first line of buffer, the iter is not moved to the start of
the line, and the return value is wrong.

Fixed by adding the ensure_char_offsets() call.

A test case for this bug is added to the textiter gtk testsuite.
2017-02-18 20:00:32 +00:00