Commit Graph

352 Commits

Author SHA1 Message Date
Matthias Clasen
ec8db379a6 tests: Disable the textview-margins reftest
It is too flaky to be useful.
2021-01-30 19:57:24 -05:00
Matthias Clasen
749f1a7c00 Add a reftest for transform-origin 2021-01-24 23:47:10 -05:00
Matthias Clasen
bbfaacb598 Add a reftest for box flipping
Test that a horizontal box changes the order of its
children in RTL, and that widget margins flip start
and end.

This tests the fix in d89ff71819.
2021-01-15 18:43:31 -05:00
Emmanuele Bassi
99e0929d6c build: Use a consistent style for Meson files 2020-12-15 12:46:59 +00:00
Matthias Clasen
a828d4318e Mark flaky tests as flaky
We can't mark these as xfail, since it sometimes succeed.
2020-12-08 18:10:02 -05:00
Matthias Clasen
2caf283323 Mark the window-show-contents-on-map.ui reftest as xfail
We know now what the test is trying to test, just lack
the right plumbing to do it properly. So, keep the test
around, marked as expected fail.
2020-12-08 12:04:47 -05:00
Matthias Clasen
6fb66e299a Revert "reftests: Remove window-show-contents-on-map.ui test"
This reverts commit 074b933ae4.
2020-12-08 11:45:52 -05:00
Jonas Ådahl
074b933ae4 reftests: Remove window-show-contents-on-map.ui test
It tested that a widget shown after the window was mapped deals with
window resizing appropriately when doing the follow-up allocation. Now,
doing this only allocates both at the same time, as allocation happens
during the frame dispatch.

To do the equivalent now, one would have to write code that shows the
label after the first frame was drawn, and that's not possible via a
reftest, so lets remove it.
2020-12-08 14:22:59 +01:00
Jonas Ådahl
7b7f3342d8 reftests/textview-tags: Hide text view cursor
Otherwise it'd sometimes show up, causing test flakyness.
2020-12-08 12:03:18 +01:00
Matthias Clasen
74a7f73239 Merge branch 'matthiasc/builder-requires' into 'master'
Matthiasc/builder requires

See merge request GNOME/gtk!2806
2020-11-11 03:53:52 +00:00
Matthias Clasen
18779b9d67 testsuite: Remove <requires> from ui files
We don't need these here, the testsuite is shipped
with GTK.
2020-11-10 19:17:45 -05: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
Arnaud Bonatti
f7de0bc9c8 Fix tests with regard to GtkBuilder <requires>. 2020-11-07 16:17:36 +01:00
Emmanuele Bassi
88113956a3 tests: Use the test ATContext for every test
Otherwise we're going to need a full desktop session in order to run the
test suite.
2020-10-12 16:19:32 +01:00
Emmanuele Bassi
4b60e7470a Use test AT context with installed tests
Otherwise we're going to need an AT-SPI service on the session, and the
accessibility bus.
2020-10-12 16:19:31 +01:00
Matthias Clasen
30b7545fb5 Add a reftest for flipping transforms
Verify that a scale of -1 does in fact cause a
gradient to go the other direction.
2020-09-28 21:07:51 -04:00
Matthias Clasen
b69e8d8e7b Remove GtkRadioButton uses in ui files in tests 2020-08-30 21:23:25 -04:00
Timm Bäder
1375fb4464 Change button hierarchy
A radiobutton without indicator is really just a togglebutton with a
group.

A radiobutton with indicator is really just a checkbutton with a group.

Make checkbutton its own widget not inheriting from GtkButton.
GtkRadioButton could be removed but it stays for now.

Radiobutton && !draw-indicator => Togglebutton
Checkbutton && !draw-indicator => Togglebutton

Radiobutton && draw-indicator => CheckButton + group
2020-08-29 16:46:28 +02:00
Matthias Clasen
c890d5991c Add reftests for center layout
Add a test that checks behavior with invisible children,
and another one that ensures we go back to box-like
layout if min-size is forced.
2020-08-24 12:02:34 -04:00
Matthias Clasen
08f58122d1 Add a reftest for grid layouts
This tests that invisible children don't influence
the layout.
2020-08-24 11:38:00 -04:00
Matthias Clasen
17dcb10707 Add a reftest for box layouts
This tests that invisible children don't influence
the layout.
2020-08-24 11:34:30 -04:00
Björn Daase
6315cd977c *: Fix spelling mistakes found by codespell 2020-08-21 15:29:34 +02:00
Matthias Clasen
21a1413bf3 Add a reftest for gradients with hard stops
This is testing the issue described in #1293.

No fix though, this is still broken in Vulkan.
It works correctly in GL and with cairo.
2020-08-05 08:10:35 -04:00
Matthias Clasen
ed13e6a41e grid layout: Rename some properties
Rename GtkGridLayoutChild:left-attach/top-attach to
GtkGridLayoutChild:column/row. Update all users.

Fixes: #2967
2020-08-02 17:58:03 -04:00
Benjamin Otte
d7266b25ba Replace "gint" with "int" 2020-07-25 00:47:36 +02:00
Matthias Clasen
8c4df51a14 tests: Plug some more memory leaks
These showed up under asan.
2020-07-09 00:33:14 -04:00
Matthias Clasen
0dc946da63 testsuite: Assorted leak fixes
All found by asan.
2020-07-08 17:44:49 -04:00
Alexander Larsson
5059854a2e reftest: Clean up reftest_inhibit_snapshot()
This was done in a weird way where we always call reftest_uninhibit_snapshot()
on paint, and then re-inhibited it if it wasn't inhibited. To make this
work it also started with an extra inhibit.

This is very contorted and based on how this historically worked. This
changes it to just do:

  if (inhibit_count > 0)
    return;

And keep inhibit_count at its initial zero value unless it is actually
inhibited.
2020-06-04 15:45:29 +02:00
Alexander Larsson
b4af23be23 snapshot: Fix assert in inhibition
In https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/2027 i was getting

Bail out! ERROR:../testsuite/reftests/reftest-snapshot.c:212:reftest_uninhibit_snapshot: assertion failed: (inhibit_count > 0)

In (for example the box-shadow-changes-modify-clip reftest. I can reproduce this (on master) with:

```
$ xvfb-run -a -s "-screen 0 1024x768x24" meson test --suite gtk:reftest "reftest box-shadow-changes-modify-clip.ui"
...
1/1 gtk:reftest / reftest box-shadow-changes-modify-clip.ui ERROR          0.77s
``

Fix this by re-inhibiting if we didn't draw anything, or we will get an assert the next paint.
2020-06-04 14:22:27 +02:00
Alexander Larsson
20f15f5111 reftests: Fix frame inhibiting
Actually inhibit snapshotting of frames from reftest_inhibit_snapshot.
We were not ignoring the case where inhibit_count > 0, and then disconnected
the callback meaning we only ever got the first snapshot.
2020-05-28 15:13:13 +02:00
Matthias Clasen
e7a420c40e testsuite: Re-add the sizegroups-evolution reftest
It doesn't seem to cause problems in ci anymore.
2020-05-22 17:10:28 -04:00
Matthias Clasen
e60ea00e8b reftests: Fix the background-origin test
This was broken when I accidentally removed
one of the buttons.
2020-05-22 10:48:33 -04:00
Timm Bäder
dd370db62a reftests: Pass common_cflags 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
c22af88235 tests: Allow setting a subdir for output
meson seems somewhat weak when it comes to handling
test output. We need to get the output from different
test runs into different locations, and the only
way to communicate from a test setup with the actual
test code seems the environment, so use that.

Make all tests that produce output in files respect
a TEST_OUTPUT_SUBDIR environment variable which specifies
the name of a subdirectory to use. This is combined
with the existing --output argument, which specifies
a per-test location.

Affected tests are reftests, css performance tests
and gsk compare tests.
2020-05-15 14:11:53 -04:00
Matthias Clasen
bc6643f3c2 paned: Redo the api
This commit is porting GtkPaned to be derived
from GtkWidget instead of GtkContainer, while adding
start-child and end-child properties. The existing
properties are renamed to follow the start/end naming
scheme, and we add proper getters and setters.

Update all users.

See #2719
2020-05-11 22:21:33 -04:00
Matthias Clasen
cd0081d08a Use gtk_window_destroy
Replace calls to gtk_widget_destroy on windows
with gtk_window_destroy.
2020-05-11 12:20:57 -04:00
Matthias Clasen
17c21513a8 testsuite: Update a testcase
Our testcase for flipping icons used media icons which
were recently changed to not do rtl flipping anymore.
2020-05-04 22:53:08 -04:00
Matthias Clasen
f59f355190 Use gtk_window_set_child throughout
Replace all uses of gtk_container_add on windows
by gtk_window_set_child.
2020-05-04 22:53:08 -04:00
Matthias Clasen
fa2a8ac1bb reftests: Remove window-show-contents-on-map from xfails
This test passes now.
2020-04-26 09:18:54 -04:00
Matthias Clasen
56565b12d8 reftests: Fix the window-show-contents-on-map test
Despite the name, the test was not in fact showing
contents on map anymore, since widgets are visible
by default. Setting visible to FALSE makes the test
work as expected again.
2020-04-26 09:16:25 -04:00
Matthias Clasen
99d7130da3 reftests: Remove background-image-multiple from xfails
It no longer fails.
2020-04-25 13:26:14 -04:00
Matthias Clasen
ac3e604bb6 reftests: Use transform syntax
This is supposed to fix the background-image-multiple
reftest, but it doesn't. There's an actual bug here.
2020-04-25 12:47:17 -04:00
Matthias Clasen
1d86a89ccf testsuite: Take textview-border-windows out of xfails
The textview-border-window reftest passes now, so
take it out of the xfails.
2020-04-24 18:35:22 -04:00
Matthias Clasen
c192038027 reftests: Avoid text caret from interfering
We are comparing a transparent label to a transparent
text view, so need to make sure the caret does not show
up in the text view to ruin the comparison.
2020-04-24 18:33:57 -04:00
Matthias Clasen
894e1d0885 testsuite: Take border-color-transparent out of xfails
The border-color-transparent reftest passes now, so
take it out of the xfails.
2020-04-24 15:20:58 -04:00
Matthias Clasen
c8d4a48c03 reftests: Avoid theme influence
Reset to defaults in background-color-transparent,
to avoid theme influence in the results.
2020-04-24 15:19:24 -04:00
Matthias Clasen
7ce964a455 reftests: Avoid decorations
Window decorations always cause trouble between ci
and local test runs, so turn them off for the
background-color-transparent reftest.
2020-04-24 15:18:02 -04:00
Matthias Clasen
96f9f9585f reftests: Stop using shadow-type 2020-04-17 11:06:16 -04:00
Matthias Clasen
df1816a29c button: Drop relief
We are only using this as a boolean, so change it
to a boolean property named has-frame.
2020-04-17 10:57:36 -04:00