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
Matthias Clasen
d2951d3aac
Rename surface constructors
...
We want to use a gdk_surface_new_popup for popups,
and align the constructor names with the surface
types, so rename
gdk_surface_new_popup -> gdk_surface_new_temp
gdk_surface_new_popup_full -> gdk_surface_new_popup
The temp surface type will disappear eventually.
2019-05-28 20:25:14 +00:00
Matthias Clasen
2ef8bd0b95
entry completion: Make final
2019-05-27 20:23:50 -04:00
Matthias Clasen
280bbfe522
Drop cellarea subclassing tests
2019-05-26 22:14:20 -04:00
Benjamin Otte
928c85ccc3
rendernodeparser: Parse Cairo nodes
...
We also print the script, but we don't parse it yet.
2019-05-26 00:50:13 +02:00
Krzesimir Nowak
49d994ddc2
testsuite: Fix leak
2019-05-21 19:23:00 +02:00
Benjamin Otte
63a8144e1a
testsuite: Remove serialize-deserialize test
...
The serialize-deserialize test is completely handled via the new
nodeparser tests.
So move those tests over and delete the old test binary.
2019-05-21 06:43:59 +02:00
Benjamin Otte
0a32305f01
testsuite: Add render tests for all the empty nodes
...
Test that rendering empty nodes succees. For a lot of nodes the
resulting rendering isn't clearly defined, in those cases we overdraw
those regions (sometimes the whole image) with black.
2019-05-21 06:43:59 +02:00
Benjamin Otte
eb386134e3
testuite: Improve compare-render binary
...
- Remove remains of g_test_*() functions
We're not a glib test, we're a simple binary.
- Handle nonexistence of reference image properly
Don't assert, but create the output image and the error out.
2019-05-21 06:43:59 +02:00
Benjamin Otte
b37c2216fc
testsuite: Add empty node tests
...
For every node type, add a test that creates it empty and ensure that
it prints the reference output.
2019-05-21 06:43:59 +02:00
Benjamin Otte
b90a66cab5
rendernodeparser: Allow parsing strings
...
Instead of only allowing for glyph indexes, allow ASCII characters as
replacements. So this glyph sequence
glyphs: 65 8, 66 8, 67 8
Can be replaced by
glyphs: "ABC"
provided that the glyph for "A", "B" and "C" are 65, 66 and 67
respectively and their advance is exactly 8.
x offset and y offset must always be 0 and every glyph must start a
cluster.
2019-05-21 06:43:59 +02:00
Benjamin Otte
1a65a6ce76
rendernodeparser: Update to new rules
...
Update to the docs outlined in #1887 .
In particular, the changes do:
1. Require no property, have a working default for everything
2. Be clear about what gets printed and how.
Tests ahve been adapted to still pass.
2019-05-21 06:43:59 +02:00
Benjamin Otte
a1d08b4b52
rendernode: Take a graphene_point_t for the offset
...
... instead of 2 floats.
2019-05-21 06:43:59 +02:00
Benjamin Otte
0fd0be4f9a
testsuite: Redo node-parser
...
Base the rewrite on testsuite/css/parser/test-css-parser - we now
require the node file to match a reference node and track the errors it
triggers.
We also no longer use gtester.
2019-05-21 06:43:59 +02:00
Benjamin Otte
ed0ecf0ff0
rendernodeparser: Allow single values instead of 4
...
This allows writing:
colors: red;
instead of
colors: red red red red;
to draw a red border.
2019-05-21 06:43:59 +02:00
Benjamin Otte
c8fc40e793
rendernodeparser: Print properties alphabetically
...
Because now we have a rule.
Also update some tests to the new order.
2019-05-21 06:43:59 +02:00
Benjamin Otte
6e2df85ec8
Merge branch 'wip/otte/for-master' into 'master'
...
Wip/otte/for master
Closes #1900
See merge request GNOME/gtk!854
2019-05-18 15:19:29 +00:00
Benjamin Otte
04da31f5f5
build: Convert CSS parser tests to single meson tests
2019-05-18 17:06:08 +02:00
Matthias Clasen
9d16715eb3
Merge branch 'menubutton-no-button' into 'master'
...
Menubutton: don't derive from GtkButton
See merge request GNOME/gtk!853
2019-05-18 13:13:48 +00:00
Matthias Clasen
83d9e7a1c3
Adapt tests
...
We no longer have a clicked signal on GtkMenuButton.
2019-05-18 13:06:33 +00:00
Timm Bäder
2979aea3ae
testsuite: Add a color matrix test case
...
Color matrix nodes with an identity matrix and no offset should still
produce the expected image.
2019-05-18 13:47:59 +02:00
Carlos Garnacho
c2d92794e2
gdk/x11: Drop GdkDeviceManagerCore
...
Keep only the XInput2 device manager, which handles "modern" stuff
like scroll and touch.
2019-05-15 01:05:29 +02:00
Benjamin Otte
6f6b07aaae
testsuite: Stop using g_test_bug()
...
The calls used old bugzilla URLs and nobody cared about that.
So apparently they are very unused.
There's also a potential conflict between gitlab and bugzilla URLs and
what base bug to use there.
The old usages have been converted to comments.
2019-05-12 17:28:18 +02:00
Benjamin Otte
63578d832a
testsuite: Don't die on the first error
...
Continue running the test, just mark it as a failure.
2019-05-12 17:27:01 +02:00
Benjamin Otte
3a373b9b33
rendernodeparser: Parse images differently
...
Instead of encoding the raw data, encode the full image to a PNG.
And instead of stuffing that encoding into a string, use a full
data: url.
And then remove the width and height properties, because they're now
implicitly included in the data.
And then change the parser to match.
And because the parser now parses regular urls on top of data: urls, we
can now load any random file.
2019-05-12 17:27:01 +02:00
Benjamin Otte
8be95ca348
css: Add data URL parsing to images
2019-05-12 17:27:01 +02:00
Benjamin Otte
5da58ba47d
css: Add gtk_css_data_url_parse()
...
This surprisingly decodes data URLs.
2019-05-12 17:27:01 +02:00
Benjamin Otte
b651a355ab
build: Fix
...
I did somethig wrong there. Whoops
2019-05-08 01:15:17 +02:00
Benjamin Otte
dd299c50bf
csstokenizer: Add more testcases
2019-05-08 00:58:52 +02:00
Benjamin Otte
bc7972dfa7
csstokenizer: Handle backslash at end of document
...
Testcases included.
2019-05-08 00:58:52 +02:00
Timm Bäder
730b52b084
testsuite: Add blur node testcase
...
Renderers need to handle blur radius 0 as well. Currently broken in GL
and (I guess, unless it's my driver) Vulkan.
2019-05-07 17:21:16 +02:00
Matthias Clasen
a0c6d88858
Mark a failing reftest as xfail
...
I don't know why we expect different window types
to render identically in the first place.
2019-05-07 03:27:04 +00:00
Matthias Clasen
68560a941a
Update a11y tests
2019-05-07 02:21:30 +00:00
Timm Bäder
c8865459fc
testsuite: Add blend-difference test case
...
Comparing blend nodes with mode: difference
2019-05-06 17:34:48 +02:00
Timm Bäder
8559593a18
testsuite: Add a blend node test case
...
This is currently broken in the GL renderer.
2019-05-06 17:34:48 +02:00
Benjamin Otte
562e492056
csstokenizer: Consume the \ when encountering an error
...
Otherwise we infinitely end up with the error again.
Testcases added.
2019-05-06 05:56:06 +02:00
Matthias Clasen
d61e77dab4
Add some tests
...
These test various aspects of ui file conversion.
2019-05-05 17:13:38 +00:00
Matthias Clasen
82eee65334
testsuite: Add tests for ui file rewriting
...
Add a test script that runs
gtk4-builder-tool simplify --3to4.
No actual tests yet.
2019-05-05 17:13:13 +00:00
Matthias Clasen
4f6cc46278
Fix the simplify test
...
The script was returning the wrong number of tests.
2019-05-05 15:21:58 +00:00
Benjamin Otte
43a5ff8e01
testsuite: Add serialize test for debug node
2019-05-05 07:18:39 +02:00
Benjamin Otte
da5b99f807
testsuite: Add rounded-rect parsing test
2019-05-05 07:18:39 +02:00
Benjamin Otte
b4f5baf4fa
rendernode: Parse and print blend nodes properly
2019-05-05 07:18:39 +02:00
Timm Bäder
8c04129b94
testsuite: Add nodeparser test case
...
A serialized frame from the widget factory!
2019-05-05 07:18:39 +02:00
Timm Bäder
dde69802cd
Add error func to node deserialization
2019-05-05 07:18:39 +02:00
Benjamin Otte
5530331b35
testsuite: Black out parts of reftest
2019-05-05 07:18:39 +02:00
Timm Bäder
a55ebf2350
testsuite: Remove old cairo/vulkan tests
...
They are still in the old binary format and haven't worked for a while.
2019-05-05 07:18:39 +02:00
Timm Bäder
58666c6210
testsuite: Add another gl renderer test
2019-05-05 07:18:39 +02:00
Benjamin Otte
3a9fa035ee
testsuite: Remove gl_tests infrastructure
...
They're now completely migrated to the new compare infrastructure, that
also tests Vulkan and Cairo.
2019-05-05 07:18:39 +02:00
Timm Bäder
1000d971f9
testsuite: Add cross-fade-in-opacity test
...
Making sure that an opacity node doesn't end up reviving a node that's
hidden because the cross-fade has progress 0 or 1.
2019-05-05 07:18:39 +02:00
Timm Bäder
349e6af2c8
testsuite: Remove broken GL comparison tests
...
These only work on special hardware, which not even I have anymore.
We'll need to redo them in a way that works on different systems.
2019-05-05 07:18:39 +02:00