Commit Graph

2267 Commits

Author SHA1 Message Date
Matthias Clasen
bb3a6214cb tests: Stop copying the tool tests
No point in doing that, and the meson feature
we are using here is deprecated.
2023-06-05 07:44:08 -04:00
Matthias Clasen
4f47683710 Merge branch 'wip/otte/trelistmodel-fixage' into 'main'
treelistmodel: Don't add items in reverse

Closes #5707

See merge request GNOME/gtk!5744

(cherry picked from commit c5a53f235a)

1718db14 treelistmodel: Don't add items in reverse
cd860beb Add a test for splicing treelistmodel
2023-04-26 10:31:58 -04:00
Matthias Clasen
0bf8a39177 Move some nonworking reftests to xfail
A few of the inscription reftests have been failing since 4.10.1.
Move them to xfail until somebody shows up to fix them.
2023-04-21 16:23:22 +02:00
Matthias Clasen
91ca51222a testsuite: Skip focus tests when necessary
If our window does not get focus, we can't reliably
test things that depend on widgets being focused.
2023-04-21 09:27:08 +02:00
Matthias Clasen
f0560c8cdb Try harder to fix focus tests
The focus test now asserts that its window is active.
So we should not run them in parallel with other tests,
since those might steal the focus.
2023-04-21 09:26:59 +02:00
Benjamin Otte
8178465c1a testsuite: Fix broken test to not unref surfaces twice
The test doesn't hold 2 references, it holds only one.

The reason one unref can cause a leak is that some backends - like X11 -
only destroy the surface once the DestroyNotify event from the X server
has come in.
2023-04-21 09:26:46 +02:00
Matthias Clasen
7417d30a1f testsuite: Actually wait for focus
We were failing to properly iterate the main
context here. Oops.
2023-04-21 09:23:02 +02:00
Matthias Clasen
f492e37354 tests: Check is-focus instead of has-focus
We are not presenting windows here.
2023-04-21 09:22:56 +02:00
Matthias Clasen
a6010b40f2 Merge branch 'fix-410-tests' into 'gtk-4-10'
testsuite: Fix broken test

See merge request GNOME/gtk!5855
2023-04-21 05:55:14 +00:00
Benjamin Otte
1b872743bc testsuite: Fix broken test
The test was referencing a nonexisting image.

Plus, node parsing cannot reference relative URLs.
2023-04-21 07:37:53 +02:00
Benjamin Otte
3e26418dfe Merge branch 'wip/otte/for-main' into 'main'
testsuite: Be less verbose in accessor-apis test

Closes #5763

See merge request GNOME/gtk!5851

(cherry picked from commit 03b71a9759)

be5f2250 testsuite: Be less verbose in accessor-apis test
39583e40 testsuite: Allow accessors in interfaces
e47c0760 adjustment: Split out a function
75c47755 adjustment: sanity-check values when setting them
f393f70e listbase: Don't warn on scroll in empty list
2023-04-21 00:48:27 -04:00
Benjamin Otte
5c20cb08dc rendernodeparser: Failing to parse a string is an error
Testcase included.
2023-03-31 20:26:12 -04:00
Matthias Clasen
eec1298aa1 Improve an error message
We were producing a misleading error message
when gtk_init() fails.

Fixes: #5704
2023-03-31 20:23:27 -04:00
Benjamin Otte
ea7acdace3 Merge branch 'wip/otte/for-main' into 'main'
Fix inspector doing weird stuff

Closes #5646

See merge request GNOME/gtk!5678

(cherry picked from commit f211a2177f)

f4be5c80 cssnode: Refer the correct previous item
9048e391 treelistmodel: Cache the item
bf556850 treelistmodel: Track the item in the row
c4636852 treelistmodel: Clarify docs
2023-03-19 02:24:01 -04:00
Matthias Clasen
ad84ee8352 tests: Add more tests for texture scale nodes 2023-03-14 01:14:57 -04:00
Benjamin Otte
5c9fb3a636 filefilter: If not given a name, deduce one
Otherwise we end up with a critical when cosntructing the GVariant and
the portal claims our filter is for "[Invalid UTF-8]".

Test included
2023-03-10 17:10:30 +01:00
William Roy
aaeec84d75 Fix compile_resources present source directory
In certain scenarios, address the issue where gnome.compile_resources 
fails to transmit the present source directory. This is most notably 
visible with MSBuild.
2023-03-07 21:59:50 +00:00
Benjamin Otte
987b9cec3f testsuite: Add tests for the unknown enums
See commit 40e7a265a7
2023-03-05 18:35:02 +01:00
Benjamin Otte
a77beb39a1 testsuite: Add empty test for new node 2023-03-05 18:33:37 +01:00
Matthias Clasen
47aa0dcc7f 4.10.0 2023-03-04 08:28:12 -08:00
Matthias Clasen
90a3584c1d Merge branch 'wip/otte/dont-scale-or-it-breaks' into 'main'
Add a test for lots of texture scaling and fix the fallout

See merge request GNOME/gtk!5509
2023-03-04 15:57:49 +00:00
Benjamin Otte
0581e38b09 testsuite: Add a test for stripes
The GL renderer was creating sripes for nodes that were scaled in
particular ways, probably due to rounding errors.

This testsuite focuses on one of those stripes to make sure they are
gone.
2023-03-04 02:50:38 +01:00
Emmanuele Bassi
500128d186 a11y: Plug reference leaks
The gtk_accessible_get_at_context() getter is now transfer full, which
means we need to drop the reference when getting the GtkATContext.
2023-03-03 22:07:09 +00:00
Benjamin Otte
8bbf220fdf testsuite: Add a test for large scale nodes
This test fails if we naively create fullscale
intermediate offscreens. This was fixed in the
previous commits.

This tests the fixes in 22ba6b1f33 (for
cairo) and 3a0152b65f (for GL).
2023-03-03 11:33:57 -06:00
Alexander Mikhaylenko
ca737b1411 testsuite: Add a GtkBuildable custom tag test
Just test that it doesn't error out during parsing.
2023-02-28 17:51:38 +04:00
Matthias Clasen
3de10847b9 gtk4-builder-tool: Prefer child properties
Rewrite <child> elements to use child properties
where that is easily possible.

Fixes: #5609
2023-02-19 21:48:56 -05:00
Benjamin Otte
d553f6941d Merge branch 'wip/otte/for-main' into 'main'
listview: Measure children only, not self

See merge request GNOME/gtk!5535
2023-02-19 05:33:59 +00:00
Benjamin Otte
be6a4722c0 listview: Measure children only, not self
The previous code would include CSS padding/margin/border in the
measurement and that is wrong.

Until commit a96c75ff02 this was not actually visible, but afterwards
listitems were allocated 16px too wide.

Test included
2023-02-19 05:41:29 +01:00
Matthias Clasen
ad111087cc Add a test for invisible text navigation
This shows that (at least some) things
work as expected.

See: #1811
2023-02-16 14:27:44 -05:00
Matthias Clasen
aec4bfcf3b gsk: Add a node parser test for mask modes 2023-02-14 21:47:54 -05:00
Matthias Clasen
7e18c2849b gsk: Add a render test for mask modes 2023-02-14 21:47:54 -05:00
Matthias Clasen
cb0aaf0b2c Add more mask node tests 2023-02-14 19:07:01 -05:00
Matthias Clasen
679d510059 Merge branch 'template-child-dispose-order' into 'main'
gtk: Set widget template children to NULL before destroy unref

See merge request GNOME/gtk!4611
2023-02-12 16:36:52 +00:00
Matthias Clasen
c8bfea7aa1 Add a test for mask nodes 2023-02-12 08:35:25 -05:00
Matthias Clasen
238e7ec351 Add a test for scaled textures 2023-02-11 15:09:38 -05:00
Matthias Clasen
ddf8c4dd1a Drop pixbuf format tests
We have our own loaders for the formats we
always want to support, so we don't need to
check for what gdk-pixbuf supports.
2023-02-07 07:54:22 -05:00
Matthias Clasen
d8cb11ec4a Deprecate GtkStatusbar
The design patterns using statusbar are no longer popular,
and it is pretty easy to make a statusbar yourself with boxes
and labels, if you need one. The only thing special about
GtkStatusbar was its window resize handle, but that has
been gone for a long time.
2023-02-02 08:39:24 +01:00
Matthias Clasen
19bb043a85 testsuite: Fix various compiler warnings
These are mostly dead stores that clang
isn't happy with.
2023-01-14 00:14:43 -05:00
Matthias Clasen
63560061e8 Add some more text undo tests
Unsuccessfully trying to reproduce #5506.
2023-01-10 07:34:55 -05:00
Matthias Clasen
47b5d0d546 Merge branch 'no-more-installed-tests' into 'main'
build: Drop the install-tests option

See merge request GNOME/gtk!5352
2022-12-20 05:33:56 +00:00
Matthias Clasen
d8d5cace2a ci: Declare a reftest as flaky
fixed-widget-stacking is failing frequently due
to a blinking cursor showing up in one of the
windows in ci.
2022-12-19 23:52:51 -05:00
Matthias Clasen
3121f88265 build: Drop the install-tests option
We no longer use installed tests in CI,
so lets reap the benefit and simplify
our build setup for tests.
2022-12-19 23:12:47 -05:00
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