Commit Graph

2224 Commits

Author SHA1 Message Date
Matthias Clasen
596f59f471 tests: Maybe skip introspection tests
If we don't find the python gi module,
skip the introspection test.
2022-12-19 22:38:38 -05:00
Emmanuele Bassi
0db3666d3c tests: Add shorthand-entry-border to the flaky suite
This test fairly consistently times out when running in a contended CI.
2022-12-20 02:18:25 +00:00
Matthias Clasen
aafc6279a3 Merge branch 'ebassi/ci-image-for-main' into 'main'
ci: Install Meson in the build jobs

See merge request GNOME/gtk!5335
2022-12-16 03:55:18 +00:00
Emmanuele Bassi
ce9069c85f build: Add known to be failing gsk comparison tests
The unaligned-offscreen and upside-down-label-3d tests are failing after
upgrading our CI images, seemingly because of some font rendering issue
that is hard to track. Let's use the "failing" testsuite mechanism that
we also use for the reftests.
2022-12-14 17:40:04 +00:00
Matthias Clasen
fba4cea2e8 testsuite: Stop using gtk_widget_show/hide 2022-12-13 13:46:02 -05:00
Matthias Clasen
be324cc665 testsuite: Skip tests that miss charset support
This came up when running the tests in a fresh
toolbox missing the glibc-gconv-extra package.
2022-11-29 03:52:27 -05:00
Simon McVittie
94b57a967c testsuite: Don't create .test files for flaky or failing tests
These tests can be run manually, but are not suitable for use as an
acceptance test, so let's not make frameworks like Debian's autopkgtest
run these when they run ginsttest-runner in the most obvious way.

Signed-off-by: Simon McVittie <smcv@debian.org>
2022-11-24 13:46:33 +00:00
Simon McVittie
957dd49ef7 testsuite: Use separate setups for unstable tests instead of should_fail
There are two possible interpretations of "expected failure": either
the test *must* fail (exactly the inverse of an ordinary test, with
success becoming failure and failure becoming success), or the test
*may* fail (with success intended, but failure possible in some
environments). Autotools had the second interpretation, which seems
more useful in practice, but Meson has the first.

Instead of using should_fail, we can put the tests in one of two new
suites: "flaky" is intended for tests that succeed or fail unpredictably
according to the test environment or chance, while "failing" is for
tests that ought to succeed but currently never do as a result of a
bug or missing functionality. With a sufficiently new version of Meson,
the flaky and failing tests are not run by default, but can be requested
by running a setup that does not exclude them, with a command like:

    meson test --setup=x11_unstable --suite=flaky --suite=failing

As a bonus, now that we're setting up setups and their excluded suites
programmatically, the gsk-compare-broadway tests are also excluded by
default when running the test setup for a non-broadway backend.

When running the tests in CI, --suite=gtk overrides the default
exclude_suites, so we have to specify --no-suite=flaky and
--no-suite=failing explicitly.

This arrangement is inspired by GNOME/glib!2987, which was contributed
by Marco Trevisan.

Signed-off-by: Simon McVittie <smcv@debian.org>
2022-11-24 13:46:33 +00:00
Matthias Clasen
d34ac99916 filefilter: Add properties for the criteria
Add construct-only properties for patterns,
suffixes and mime-types. This provides an
alternative way to specify these in ui files.

Related: #5350
2022-11-21 22:44:03 -05:00
Matthias Clasen
74806ed324 Merge branch 'fix-upside-down-labels' into 'main'
gsk: Avoid a crash with negative scales

See merge request GNOME/gtk!5236
2022-11-21 10:48:29 +00:00
Matthias Clasen
f0aefe2f7f stringlist: Add a construct-only strings property
This enables creating string lists in ui files
without using custom markup.

Related: #5350
2022-11-20 14:07:45 -05:00
Matthias Clasen
b441c684ab gsk: Avoid a crash with negative scales
Don't crash when both scale_x and scale_y are -1.

A test is included.
2022-11-20 12:13:02 -05:00
Matthias Clasen
9682085e09 builder: Parse PangoAttrList values
Allow specifying PangoAttrList properties in the
serialized format supported by pango_attr_list_to_string().

Test included.
2022-11-18 10:42:50 -05:00
Matthias Clasen
ebe6d52252 Drop redundant glib version checks
We require GLib 2.72 now.
2022-11-17 22:49:56 -05:00
Matthias Clasen
e619d45ddc Add a test for picker button constructors
This turns out to be hard enough that a test
is useful.
2022-11-07 15:32:51 +01:00
Matthias Clasen
5cb84afaa9 Add a test for POTFILES.in
Add a test that runs make-pot. This will only pass
if you've updated po/POTFILES.in and .skip after
moving source files around.

Unfortunately, it won't catch new source files that
are missing.
2022-10-30 08:52:02 -04:00
Matthias Clasen
9948053cd7 Deprecate GtkDialog
GtkDialog is too flexible in terms of UI (headerbars vs action bar,
etc), and has archaic APIs. It is time to retire it.
2022-10-29 15:27:53 -04:00
Matthias Clasen
f54ab91ff3 Deprecate GtkFileChooser and implementations
These are being replaced by GtkFileDialog.

This commit only moves the headers for GtkFileChooserWidget and
GtkFileChooserDialog to deprecated/, and keeps the implementations
in gtk/, since they will eventually be salvaged into a private
GtkFileChooserWindow.
2022-10-29 13:31:41 -04:00
Matthias Clasen
a51a6a3ee2 Deprecate GtkColorChooser and implementations
These are being replaced by GtkColorDialog
and GtkColorDialogButton.

This commit only moves the headers for GtkColorChooserWidget
and GtkColorChooserDialog to deprecated/, and keeps the
implementations in gtk/, since they will eventually be
salvaged into a private GtkColorChooserWindow.
2022-10-29 13:31:41 -04:00
Matthias Clasen
aeacc8f3c5 Add GtkFontDialogButton
This is like GtkColorDialogButton, but for fonts.
2022-10-29 13:31:41 -04:00
Matthias Clasen
7d0ebe02db Add GtkFontDialog
This is similar to GtkColorDialog, but for fonts.
2022-10-29 13:31:41 -04:00
Matthias Clasen
655675e6a1 Add GtkColorDialogButton
This is a new color button implementation
built around GtkColorDialog.
2022-10-29 13:02:15 -04:00
Matthias Clasen
cd4dbd67a2 testsuite: Skip known-broken tests
The tiff pixbuf tests fail because of known
issues with the pixbuf tiff loader. Skip them.

Fixes: #4615
2022-10-18 23:22:47 -04:00
Matthias Clasen
5a6eab05e9 testsuite: Fix tiff pixbuf tests
This test wasn't actually testing what it claims,
since that functionality is broken in gdk-pixbuf.

Test it anyway.
2022-10-18 23:21:28 -04:00
Matthias Clasen
ccaaff406f testsuite: Ignore deprecations
Some of our tests use deprecated style context
apis. Ignore the deprecations for now.
2022-10-12 15:35:00 -04:00
Matthias Clasen
c32fed9238 testsuite: Ignore deprecations
For now, just ignore deprecations. Eventually,
we will have to go through, drop demos that are
for wholly deprecated widgets, and update others.
2022-10-11 17:18:21 -04:00
Matthias Clasen
5e256590db Deprecate treeviews and cell renderers
This includes

GtkCellArea
GtkCellAreaBox
GtkCellAreaContext
GtkCellEditable
GtkCellRenderer
GtkCellRendererAccel
GtkCellRendererCombo
GtkCellRendererPixbuf
GtkCellRendererProgress
GtkCellRendererSpin
GtkCellRendererSpinner
GtkCellRendererText
GtkCellRendererToggle
GtkCellView
GtkComboBox
GtkComboBoxText
GtkIconView
GtkListStore
GtkTreeModel
GtkTreeModelFilter
GtkTreeModelSort
GtkTreeStore
GtkTreeView
GtkTreeViewColumn
GtkTreeSelection
2022-10-11 17:18:21 -04:00
Matthias Clasen
7c5e1c6195 gtk: Rename some private headers
Improve the consistency of our private header
naming, by add 'private' to a bunch of them.
2022-10-05 23:01:28 -04:00
Matthias Clasen
7e9ca5b41d Deprecate GtkEntryCompletion
We want to drop cell renderers and tree models
in GTK 5. The functionality of GtkEntryCompletion
may be replaced by a new widget in GTK 5.
2022-10-03 23:23:56 -04:00
Matthias Clasen
a527a4d82e Deprecate the app chooser widgets
These are a family of pretty specialized widgets, and
are very rarely used. Instead of porting them away
from GtkTreeView and GtkComboBox, deprecate them.
2022-10-03 23:02:09 -04:00
Matthias Clasen
911abe2d2c Fix expected test output
The major.minor version number shows up in the expected
output of this test, so it needs to be adjusted at the
beginning of every cycle.
2022-09-28 13:32:40 -04:00
Matthias Clasen
1e65d6640f tests: Rewrite the icontheme tests
The lookup order tests were relying on out
debug spew using g_log, so they can redirect
the output by setting a log writer function.

Rewrite this to use g_test_subprocess() and
parse stderr.
2022-09-23 18:12:39 -04:00
Matthias Clasen
72d6241c84 Add a test for short compose sequences
Add a table that has a short sequence
to verify that we can parse this.
2022-09-12 22:30:47 -04:00
Matthias Clasen
aac3f1860f Update test results
The table sizes change, even though none of our
test tables include short sequences.
2022-09-12 22:30:47 -04:00
Matthias Clasen
e8e69a1208 Make clipboard tests work with portals
This was not working right, since it hasn't been
tested with portals - there are no portals in ci.
2022-09-07 08:45:31 -04:00
Matthias Clasen
9cc1dcf2a4 4.8.0 2022-09-06 15:59:04 -04:00
Matthias Clasen
83bf193218 Add a test for treelistmodel row collapse
Test that we can expand and collapse a row, and then
add another child below it, without crashing.

Adapted from the testcase in #4595.

This tests the fix in the previous commit.
2022-08-24 08:23:22 -04:00
Simon McVittie
3cfe04aa74 icontheme test: Assert that the subprocess passed
Noticed while backporting GLogWriterFunc fixes to 3.24.x (#5119).

Signed-off-by: Simon McVittie <smcv@debian.org>
2022-08-20 19:38:29 +01:00
Marc-André Lureau
3585da6b7f build-sys: fix linker warning on win32
[196/296] Linking target testsuite/gtk/builder.exe
/usr/lib/gcc/x86_64-w64-mingw32/11.2.1/../../../../x86_64-w64-mingw32/bin/ld: warning: --export-dynamic is not supported for PE+ targets, did you mean --export-all-symbols?

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2022-08-18 11:44:34 +04:00
Matthias Clasen
6c3119bc33 tests: Check the error first
The error contains useful information when
things fail, so check it first to get useful
output in case of failure.
2022-08-11 07:29:56 -04:00
Emmanuele Bassi
ba1a084899 Apply 1 suggestion(s) to 1 file(s) 2022-08-07 18:54:19 +00:00
Hannes Müller
703fc51d8e build: fix for use with glib 2.66.0
Add missing #define g_memdup2() for gdksurface-broadway.c in case of enabled
broadway-backend as used otherwise.

Copy static would_drop() replacement for g_log_writer_default_would_drop()
from gtk-builder-tool.c to gtk-reftest.c
2022-08-06 21:11:08 +02:00
Emmanuele Bassi
6c37158bbc Re-enable the TextBuffer wrap-mode serialization test
The private serialization function is now available on all platforms.
2022-08-04 23:39:54 +01:00
Emmanuele Bassi
d030c92d63 Move private function out of the AT-SPI a11y backend
The textbuffer test is calling into a function defined by the AT-SPI
accessibility backend. As of commit 4ddf1b70 we only build and run the
test on Linux, but the function in question isn't really
accessibility-related: it's just a serialization function.
2022-08-04 23:34:41 +01:00
Matthias Clasen
edf8c9e501 Merge branch 'matthiasc/for-main' into 'main'
css: Fix handling of transform values

See merge request GNOME/gtk!4890
2022-07-18 14:24:49 +00:00
Matthias Clasen
03f24bb5cf css: Improve test coverage
Among other things, this includes a test for the fix
in the previous commit.
2022-07-18 07:08:01 -05:00
Matthias Clasen
eb1a2268bb gtk: Improve test coverage 2022-07-18 07:08:01 -05:00
Matthias Clasen
64193ae706 sortlistmodel: Add more tests 2022-07-18 07:08:01 -05:00
Matthias Clasen
4682eb214a filterlistmodel: Add more tests 2022-07-18 07:08:01 -05:00
Mat
89db59a40d treepopover: Add support for scrolling
Add support for scrolling large tree popovers in a similar fashion to GtkPopoverMenu.

Fixes #3674
Fixes #4877
2022-07-18 00:44:28 +03:00