Commit Graph

1824 Commits

Author SHA1 Message Date
Matthias Clasen
2dcc641d5a testsuite: Improve coverage for GdkDisplayManager 2020-11-01 21:23:35 -05:00
Matthias Clasen
c8432ae668 testsuite: Improve coverage for seats 2020-11-01 21:23:35 -05:00
Matthias Clasen
642ad4e06f testsuite: Improve coverage for rectangles 2020-11-01 21:23:35 -05:00
Matthias Clasen
07c491f235 testsuite: Improve coverage for keys 2020-10-31 14:57:02 -04:00
Matthias Clasen
970f91ec24 testsuite: Add more css parser tests
Add tests for url parsing.
2020-10-31 09:18:40 -04:00
Matthias Clasen
48381bd4f6 testsuite: Add a forgotten test
I've written this test a while ago, but did not add
it to the test data list in meson.build.
2020-10-31 08:30:02 -04:00
Matthias Clasen
1a12999431 testsuite: Add a css test
This test verifies that CDO and CDC are ignored
as required.
2020-10-31 00:38:49 -04:00
Matthias Clasen
875452b476 testsuite: Improve coverage for GtkMultiSorter 2020-10-30 23:33:34 -04:00
Matthias Clasen
1c4c5e3b80 testsuite: Improve coverage for GtkStringList 2020-10-30 23:33:15 -04:00
Matthias Clasen
9b78bc4af7 testsuite: Improve coverage 2020-10-30 23:04:23 -04:00
Matthias Clasen
26150d8489 testsuite: Improve coverage for GtkExpression 2020-10-30 22:27:40 -04:00
Matthias Clasen
59dd7d8900 testsuite: Improve coverage for GtkMultiFilter 2020-10-30 22:27:40 -04:00
Matthias Clasen
c279bdaa81 testsuite: Improve coverage for GtkStringFilter 2020-10-30 20:15:25 -04:00
Matthias Clasen
01d52a7292 testsuite: Make all css tests run again
The tests in subdirectories of testsuite/css were
using an environment defined in the parent directory,
causing them to not find their test data. Give each
test directory its own environment.
2020-10-30 20:14:17 -04:00
Matthias Clasen
2b38d14bf5 tests: Improve coverage for css data url parsing
Cover the error conditions as well.
2020-10-30 19:26:56 -04:00
Matthias Clasen
d35a21873e testsuite: Improve coverage for GtkBoolFilter 2020-10-30 18:17:50 -04:00
Matthias Clasen
505df337c2 Add a test for constraints in ui files
Test the various values that are possible for the constraint
attributes.
2020-10-30 16:21:14 -04:00
Matthias Clasen
29ccd13e15 docs: Stop referring to the Quartz backend
Its MacOS now.
2020-10-29 14:23:46 -04:00
Matthias Clasen
d5b9489408 Merge branch 'wip/baedert/for-master' into 'master'
Wip/baedert/for master

Closes #3282

See merge request GNOME/gtk!2755
2020-10-27 22:38:58 +00:00
Matthias Clasen
0c49f7349d Merge branch 'matthiasc/a11y-buildable' into 'master'
Implement accessible attributes for ui files

See merge request GNOME/gtk!2751
2020-10-27 18:13:44 +00:00
Matthias Clasen
37d4932b31 a11y: Add more tests
Test some of the attributes that GTK maintains
for every widget.
2020-10-25 19:29:00 -04:00
Matthias Clasen
0fddf73ddb a11y: Add some parser tests
Checking basic support for acessible states, properties
and relations in ui files.
2020-10-25 13:01:44 -04:00
Matthias Clasen
7671c1074b Tweak focus tests
These tests are a bit fragile because the initial focus
that is taken depends on what ends up in the center of
the window, horizontally or vertically, which depends
on things like fonts, or theme spacing.

This commit makes some tweaks to push things in the
widget-factory example around far enough to make the
tests work again.

We should figure out a way to make this more robust.
2020-10-22 21:18:46 -04:00
Timm Bäder
0dae1f48fd listbox test: Only compare values for rows we have
This shouldn't happen, but don't compare 100 values if we didnt' get 100
values from the listbox.
2020-10-22 17:46:33 +02:00
Matthias Clasen
800eb76a2d linkbutton: Use the LINK role
It is a bit ambiguous, but I think link buttons are
more links than buttons. See WAI-ARIA for a discussion
of the differences.

Update tests to match.
2020-10-21 22:19:54 -04:00
Matthias Clasen
ef9ec43469 a11y: Add some more tests 2020-10-20 22:44:24 -04:00
Matthias Clasen
93481e6c2e a11y: Add tests for GtkFlowBox
Test that roles, states and properties are as expected.
2020-10-20 01:12:20 -04:00
Matthias Clasen
b9e9898212 a11y: Add tests for GtkListBox
Test that roles, states and properties are as expected.
2020-10-20 01:07:13 -04:00
Matthias Clasen
7c47b6907b a11y: Add tests for GtkStack and GtkStackSwitcher
Test that the roles, states and relations are
as expected.
2020-10-20 00:46:07 -04:00
Matthias Clasen
b10d5ec8ff a11y: Add a test for label properties
Now that we set the label property, we should test it too.
2020-10-20 00:25:39 -04: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
8c18480092 a11y: Add a display to GtkATContext
Since we need to check at run time what kind of AT context to use, we
need a hook into the whole GDK backend machinery. The display connection
seems to be the best choice, in this case, as it allows us to determine
whether we're running on an X11 or Wayland system, and thus whether we
should create a GtkAtSpiContext.

This requires some surgery to fix the GtkATContext creation function, in
order to include a GdkDisplay instance.
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
Chun-wei Fan
1e4d3b6ca1 testsuite/gtk/builder.c: Fix running on Visual Studio
Explicitly say in the code that we are exporting the symbols so that when the
test program runs, it can find the required builder symbols.
2020-10-08 16:11:35 +08:00
Matthias Clasen
8ca612c966 scale: Make draw-value default to FALSE
This is rarely what you want, so lets turn it off
by default.

Update the one place in our demos where we want to
draw a value, add support for this to gtk-builder-tool,
add a test and mention this change in the migration
guide.
2020-10-04 08:26:44 -04:00
Matthias Clasen
ac79c0e799 textbuffer: Improve some get_iter apis
Make these functions return FALSE if they did not
return the exact position that was requested.

Adapt tests.

Based on a patch by Sebastien Wilmet

Fixes: #506
2020-10-03 14:29:07 -04:00
Matthias Clasen
d0b7a4a4ec testsuite: Add a test that checks for property accessors
Make sure that every object property in GTK has accessors for getting
its value (if the property is readable) or setting it (if it is
writable).

Since we are still missing accessors, the test is allowed to
fail for now. Sadly, mesons xfail support is busted, so we just
disable the test entirely :(

Based on initial work by Benjamin Otte.

Related: #2440
2020-10-03 14:28:37 -04:00
Matthias Clasen
cef1cd19ff gsk: Avoid long lines in serialized nodes
When encoding big blobs of data in base64, insert newlines.
Base64 allows it, CSS allows it, so not need to make GtkTextView
struggle with multi-megabyte lines.

Update nodeparser tests to reflect this change.
2020-10-03 13:10:55 -04:00
Matthias Clasen
f6bd2f4d3f Add a test for gsk_gl_shader_compile
This is not super useful, but at least we can
test that we get an error message including the
shader text.
2020-10-01 23:45:05 -04:00
Matthias Clasen
4e55220d76 Add some shader tests
These are just basic api usage tests, no rendering.
They found the issues fixed in the preceding commits.
2020-09-29 09:51:16 +02: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
Florian Müllner
12189bc10f buildable: Rename set_name() to set_buildable_id()
GtkBuildable's get_name()/set_name() methods may shadow
GtkWidget's methods. Avoid that by renaming the API to
get_buildable_id()/set_buildable_id(), which also reflects
the name of the XML attribute the API refers to.

https://gitlab.gnome.org/GNOME/gtk/-/issues/3191
2020-09-26 02:16:05 +02:00
Alexander Larsson
8e59cdabac Add GDK_MEMORY_R8G8B8A8_PREMULTIPLIED
This is the default OpenGL format, and in fact the only pixel format
that GLES supports uploading as. Actually, the premultiplied part is
really just about how we use the textures, but all textures in GTK
are premultiplied.
2020-09-25 09:31:43 +02:00
Matthias Clasen
d89f7fd046 Drop gtk_widget_new
An abstract type should not have a constructor.
If you want to be generic, just use g_object_new.
2020-09-19 16:58:42 -04:00
Matthias Clasen
929a56e53c Clean up lots of GTK+ -> GTK
Replace most remaining uses of GTK+ in the docs and
user-visible strings by GTK. Also remove some leftover
"Was added in 3.x" sentences from the docs.
2020-09-12 12:01:04 -04:00
Matthias Clasen
cb2b0688ca Merge branch 'filter-constructors' into 'master'
Filter constructors

See merge request GNOME/gtk!2360
2020-09-08 12:58:27 +00:00
Matthias Clasen
3b6941b04b Add some tests for the axis-aligned check 2020-09-07 14:22:47 -04:00
Matthias Clasen
24389a0ef5 Make sorter constructors return exact types
Make functions like gtk_custom_sorter_new() return
the actual type they construct.

Update all callers.
2020-09-05 21:50:15 -04:00
Matthias Clasen
dfabe74c59 Make filter constructors return exact types
Make functions like gtk_custom_filter_new() return
the actual type they construct.

Update all callers.
2020-09-05 21:43:42 -04:00
Matthias Clasen
60e37d3368 Update gsk tests
Add a clip-coordinates-2d test that is similar
to clip-coordinates-3d, but actually uses a 2D
transform.
2020-09-04 13:19:01 -04:00