Commit Graph

69 Commits

Author SHA1 Message Date
Matthias Clasen
99eed078bd Remove focusable-container tests
Like the previous commit, these tests were relying
on setting :can-focus to make an unsuspecting container
focusable, which does not work anymore.
2020-04-09 17:50:29 -04:00
Matthias Clasen
6720552afd Remove the focus test
This test was expecting to make existing widgets like
GtkBox focusable by setting :can-focus. That just doesn't
work anymore.

The focus chain testing that is done here is already
better covered by test-focus-chain, so lets just remove this.
2020-04-09 17:50:29 -04:00
Matthias Clasen
ff8217db40 Add more focus chain tests
Test page 2 and 3 of widget-factory as well, and try other directions.
2020-04-09 17:50:28 -04:00
Matthias Clasen
a3861bf9a0 Fix running focus-chain tests in ci
The widget-factory ui files require geettings
(for the color chooser), so set GSETTINGS_SCHEMA_DIR.
2020-04-09 17:50:28 -04:00
Matthias Clasen
d66121c61e Drop the keyhash test
GtkKeyHash is going away.
2020-03-25 23:14:45 -04:00
Matthias Clasen
ff056af249 Add a test for shortcut triggers 2020-03-25 23:14:45 -04:00
Matthias Clasen
5870d9d72a testsuite: Set NO_AT_BRIDGE for gtk tests
The a11y stack insists on spewing hard to control warnings
that make our tests fail. So, no accessibility for gtk tests :(
2020-03-25 17:03:58 -04:00
Matthias Clasen
c7caa53917 testsuite: disable performance tests
For some reason, these tests are flaky in ci,
they always work locally for me. So, until
we use the data these tests produce for something,
lets just turn them off.
2020-03-20 13:47:58 -04:00
Matthias Clasen
cbb0ca4902 testsuite: Tell meson we use TAP
This makes meson actually parse the individual test
results. Most of the time, it does not make a difference,
but one case where it does is when all the individual
tests of a binary are skipped, meson will mark the
test as skipped.
2020-03-20 11:55:26 -04:00
Matthias Clasen
f6fc3073fb temporarily disable window test
This test was broken by the GdkToplevel refactoring,
and needs a big gtkwindow.c configure request cleanup
before it will work again.
2020-03-19 18:08:06 -04:00
Matthias Clasen
31db615885 Revert "Merge branch 'disable-window-test' into 'master'"
This reverts commit 3ac4c76b18, reversing
changes made to 6ec96d2e98.
2020-03-19 18:03:16 -04:00
Matthias Clasen
2e70b4c323 temporarily disable window test
This test was broken by the GdkToplevel refactoring,
and needs a big gtkwindow.c configure request cleanup
before it will work again.
2020-03-19 11:25:38 -04:00
Benjamin Otte
0c81698911 shortcuts: Mananage managed shortcuts with a custom model
Reduce the amount of special casing by using a list model
for global and managed shortcuts, too.

This way, the ListModel API will work for the ShortcutController in the
GtkShortcutManager and GtkRoot.

The only special case remaining is shortcut activation, which needs to
pass the right widget to the controller in the global/managed case.
2020-03-18 23:00:51 -04:00
Matthias Clasen
66a0a8d53e Merge branch 'wip/baedert/test-cflags' into 'master'
Pass (almost) all our cflags to tests, testsuite, examples, demos, ...

See merge request GNOME/gtk!1516
2020-03-13 18:40:46 +00:00
Matthias Clasen
d70c9453ba disable popover test
This is failing atm
2020-03-11 19:35:55 -04:00
Timm Bäder
7553649c47 testsuite/gtk: Add common_cflags to build
With a few exceptions.
2020-03-07 16:28:04 +01:00
Matthias Clasen
4cf63f3eb3 wip: Use event constructors in the testsuite
This doesn't work because the constructors aren't exported,
so remove the gestures text temporarily, until we figure
out how to deal with it.
2020-02-21 00:40:52 -05:00
Matthias Clasen
cdee2ac173 testsuite: Handle icontheme test better
Skip just the failing tests in release builds.
2020-02-13 10:56:26 -05:00
Matthias Clasen
cc8506ca15 Move performance tests to the right testsuite
This was a copy-paste error.
2020-02-12 12:18:59 -05:00
Emmanuele Bassi
b99a4da939 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-02-11 14:53:57 +00:00
Matthias Clasen
8703c7b7ac Merge branch 'better-test-isolation-2' into 'master'
Better test isolation

See merge request GNOME/gtk!1391
2020-02-06 04:53:07 +00:00
Benjamin Otte
b9c880f58d testsuite: Remove the stylecontext test
Stylecontexts are on their way out and I'm removing API that the
testsuite was relying on, so remove the tests.

Put the useful parts of the tests elsewhere.
2020-02-05 04:03:43 +01:00
Alexander Larsson
a3be0ec5f0 Don't use xsettings or xft defaults in testsuite
This adds a GDK_DEBUG=default-settings flag which disables reads
from xsettings and Xft resources, and enables this for the testsuite.

This is one less way to get different testresults depending on the
environment. In particular, it was failing the css tests for me
due to getting the wrong font size because i have a different dpi.
2020-02-03 15:11:35 +01:00
Benjamin Otte
49b47c9133 Remove GtkWidgetPath
... and all associated demos and tests.
2020-01-28 02:17:02 +01:00
Matthias Clasen
9eadcd8d55 testsuite: Update mark names
We've changed some of the profiler mark names to
be clearer and more unique. Update the tests that
look for those marks to use the new names.
2020-01-23 23:48:43 -05:00
Matthias Clasen
878f35515d Make the performance testcase more general
Reuse the performance test for layout and snapshot timings.
2020-01-22 00:59:04 -05:00
Matthias Clasen
59aeae3c8e testsuite: Remove menu tests
Menus are going away.
2019-12-29 20:31:57 -05:00
Emmanuele Bassi
6b308cd71e Add constraint solver
GtkConstraintSolver is an implementation of the Cassowary constraint
solving algorithm:

  http://constraints.cs.washington.edu/cassowary/

The Cassowary method allows to incrementally solve a tableau of linear
equations, in the form of:

  x = y × coefficient + constant

with different weights, or strengths, applied to each one.

These equations can be used to describe constraints applied to a layout
of UI elements, which allows layout managers using the Cassowary method
to quickly, and efficiently, lay out widgets in complex relations
between themselves and their parent container.
2019-06-30 23:42:44 +01:00
Matthias Clasen
c4fd786866 Add a test for the grid layout manager
Test some obvious conditions. This is mainly
to test the waters for more intesting tests
with other layout managers later.
2019-06-28 13:30:16 +00:00
Matthias Clasen
fe6507f875 Add a test for gtk_widget_insert_action_group
This tests that action group inheritance
behaves as expected.
2019-06-21 03:58:13 +00:00
Matthias Clasen
f63cec30a4 Add a focus-chain test for focusable containers 2019-06-11 17:15:02 +00:00
Matthias Clasen
cfebff5dcf testsuite: more focus-chain output
Differentiate between wrapping around and
stopping at the end of the focus chain.

Update the existing tests, and add two
new ones where the difference matters.
2019-06-11 14:56:38 +00:00
Matthias Clasen
436d7cc0d1 Add a focus chain test
Add a test that enumerates the focus chain by
emitting move-focus repeatedly, and compares
the result to expected output.

The test expects a ui file and a reference
file as input. The reference file can be created
using the --generate option.
2019-06-11 10:14:23 -04:00
Matthias Clasen
0ab4a232b7 Move transform tests to the gsk suite
That is where they belong.
2019-06-03 16:10:09 +00:00
Matthias Clasen
07c8fd9997 Add a testcase for size allocation
This triggers a critical warning in gtk_widget_snapshot.
2019-05-28 20:25:15 +00:00
Benjamin Otte
5cd8e0f7f1 testsuite: Add theme-validate test
The test just loads all of GTK's themes and makes sure they cause no
errors or warnings from the CSS parser.
2019-04-18 02:28:42 +02:00
Benjamin Otte
979e9bec27 testsuite: Add a transforms test
In particular, check that to_matrix() and to_2d(), to_affine() and
to_translate() return the same values.

This also requires a recent Graphene version or the tests will fail.
2019-03-04 23:41:27 +01:00
Matthias Clasen
dcdec4bf96 testsuite: Add selection model tests 2019-02-10 18:43:59 -05:00
Matthias Clasen
9430b0b6ee testsuite: Add slice model tests
Do the same style of tests we do for all the
other list models. These tests found the issue
fixed in the previous commit.
2019-01-20 06:14:21 +01:00
Matthias Clasen
25bca27bfe Rename GtkCssRBTree to GtkRBTree
This is a generally usable red-black tree api,
and it is not used in css at all.
2019-01-14 02:14:11 +01:00
Matthias Clasen
e269f43afc Rename GtkRBTree to GtkTreeRBTree
This frees up the generic name for a more
generic rbtree implementation.
2019-01-14 02:14:11 +01:00
Simon McVittie
fa8190328d testsuite: Fix installed-test metadata for autotestkeywords
The executable is called autotestkeywords, so we shouldn't try to run
an executable named keywords. Also rename the metadata file to match.

Signed-off-by: Simon McVittie <smcv@debian.org>
2018-09-19 09:40:37 +01:00
Benjamin Otte
5bf009a203 cssrbtree: Fix a crasher
After removing elements, there were a few cases where the tree wasn't
properly balanced which could further down violate assumptions about the
layout.

Attached is the original testcase that triggered it. I didn't bother
simplifying it.
2018-09-19 04:31:29 +02:00
Benjamin Otte
5571217218 testsuite: Add tests for GtkSortListModel 2018-09-17 03:57:37 +02:00
Benjamin Otte
b6acc31d44 GtkMapListModel: add 2018-09-16 18:50:17 +02:00
Benjamin Otte
6d0fe46cba propertylookuplistmodel: Add
This model just takes an object and a property name and recursively
looks it up. In particular, I want it for:

widget, widget.parent, widget.parent.parent, ...
2018-09-16 18:50:17 +02:00
Benjamin Otte
32ec7dec61 gtk: Add GtkFlattenListModel
We can flatten lists of lists into lists now!
2018-09-16 18:50:17 +02:00
Benjamin Otte
4f70f72349 gtk: Add GtkFilterListModel
This is a GListModel implementation that filters the given source model.
2018-09-16 18:50:17 +02:00
Benjamin Otte
573c63973a gtk: Add GtkTreeListModel
This is a GListModel implementation with a neat API that can be used to
implement trees inside GtkListBox.
2018-09-16 18:50:17 +02:00
Matthias Clasen
099b967885 Don't fail the build if c++ isn't found
The intention of this check was to skip the keyword
test if no c++ compiler is found. But the meson
docs say that add_languages() will abort unless we
pass required: false.
2018-08-18 02:14:56 +00:00