Commit Graph

98 Commits

Author SHA1 Message Date
Matthias Clasen
55d35dd13e Update the expected results in the testsuite
the -gtk-scaled() change in the previous commit makes it so
that we now print out the scale factors. Update the expected
output of affected tests to take that into account.
2018-03-15 13:38:41 -04:00
Benjamin Otte
4ac3f916d0 css: Parse hex colors with alpha value
The CSS color spec version 4 introduces this, support has hit Safari,
Chrome and Firefox, so this looks like a feature that's here to stay.

https://drafts.csswg.org/css-color/#hex-notation
2018-03-02 02:00:24 +01:00
Matthias Clasen
4a22704d82 Fix test environments 2017-10-18 17:30:20 +02:00
Matthias Clasen
b0b0095cf8 Test suite cosmetics
Reshuffle things a bit more, sort the test files into subdirectories,
and shorten their names.
2017-10-18 17:30:20 +02:00
Matthias Clasen
abe7d8a846 More testsuite cosmetics
Unify the test naming some more.
2017-10-18 17:30:20 +02:00
Matthias Clasen
50c8221058 testsuite: Add missing files 2017-10-18 17:30:20 +02:00
Matthias Clasen
8b63b180d3 Distribute all test files 2017-10-18 17:30:20 +02:00
Matthias Clasen
91497348bf Update all css parser tests
I have not tracked down in detail where all these changes originate,
this commit just gets things back to working again.
2017-10-18 17:30:20 +02:00
Matthias Clasen
6b2eafe1bb Drop widget style property test 2017-10-18 17:30:20 +02:00
Matthias Clasen
5824d8b5ee Stop testing deprecated css features 2017-10-18 17:30:20 +02:00
Matthias Clasen
37f1d180c3 Make css parser tests run
We need to set G_TEST_SRCDIR and friends for this to do anything.
Setting it reveals that a bunch of the tests are broken.
2017-10-12 15:58:05 +08:00
Matthias Clasen
eb71cd195a testsuite: cosmetics
Put all tests in a suite, and order them in a nicer way.
This makes the test output look better.
2017-10-11 19:33:43 -05:00
Matthias Clasen
a4deb7e7b4 Reshuffle the css tests a bit 2017-10-10 00:18:21 -04:00
Matthias Clasen
6c294e6804 Install css parser tests again
Reinstate the installed tests for the css parser.
2017-10-09 23:29:10 -04:00
Emmanuele Bassi
391d1a04ec Drop Autotools build
We are officially switching to Meson as the default build system for
GTK+.
2017-08-14 22:23:09 +01:00
Chun-wei Fan
171ff43340 tests: Include system headers appropriately
Don't include unistd.h on Windows, and include the appropriate headers on
Windows as necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=773299
2017-07-21 23:36:03 +08:00
Timm Bäder
082cf3553d meson: Build gtk marshallers
And fix libgtk_dep/libgdk_dep to link_with the shared lib
2017-05-03 15:10:50 +01:00
Timm Bäder
1e8a606403 meson: Add unit test files 2017-05-03 15:10:50 +01:00
Matthias Clasen
52b7a96bec css parser tests: Fix radial gradient test results
This changed in commit 2a5a94b260.
2017-03-31 12:50:14 -04:00
Matthias Clasen
19f6df0c5e css parser tests: Fix up the pseudo class test
We don't recognize non-standard names anymore.
2017-03-31 12:48:06 -04:00
Matthias Clasen
55a1587f55 css parser tests: Update border image test results
We lost the ability to dump some images.
2017-03-31 12:48:05 -04:00
Matthias Clasen
7d7b45cac0 css parser tests: Drop tests for -gtk-gradient
No longer needed.
2017-03-31 12:48:05 -04:00
Matthias Clasen
7f08336108 css parser tests: Update background-image test results
We lost the ability to dump some kinds of images.
2017-03-31 12:48:05 -04:00
Matthias Clasen
215f1b9e96 css parser tests: Fix integer test results
Many of the deprecation have been removed here.
2017-03-31 12:48:05 -04:00
Matthias Clasen
b2f90e0e3b css parser tests: Fix background-blend-mode test
The css spec calls it 'saturation', not 'saturate'.
2017-03-31 12:48:05 -04:00
Matthias Clasen
c4fd5bc233 Add a css parser test for border-spacing 2016-12-10 20:41:07 -05:00
Matthias Clasen
b1f2e3b581 Remove -gtk-gradient from css parser tests
It is not supported anymore.
2016-12-10 20:40:48 -05:00
Benjamin Otte
dfd9150a82 build: Don't link against libgtk and libgdk
libgdk is statically linked these days, so if you link against it, all
of its symbols will exist twice: Once in libgtk.so and once in your
binary.
2016-11-20 11:19:32 +01:00
Benjamin Otte
4322b69528 cssprovider: Return void, not TRUE
Parsing a css file always succeeds as CSS can recover from parsing
errors.
2016-10-17 17:41:03 +02:00
Timm Bäder
f2c455fedb Remove GtkThemingEngine
As well as the corresponding GtkCssEngineValue used to parse it in css.
2016-10-16 18:17:21 +02:00
Matthias Clasen
d053d5c58f Rename Makefile references from 3.0 to 4.0
This is almost certainly incomplete.
Needs careful scrutiny
2016-10-07 10:34:50 -04:00
Matthias Clasen
c7654c737c Add a css parser test for background-blend-mode 2016-07-05 13:16:43 -04:00
Matthias Clasen
7855294594 Fix css parser tests
These tests were affected by the font and linear-gradient parsing
changes.
2016-04-26 00:03:09 -04:00
Benjamin Otte
3056d793a4 cssparser: Make _gtk_css_parser_has_number() a bit smarter
Previously we just checked the first character. And if that was a "-" as
in "-gtk-some-special-value", we assumed it was a number. Which it
clearly wasn't.

Test included
2016-02-23 04:22:19 +01:00
Benjamin Otte
0cda3ba3e8 calc: Allow subterms with '(' ')' bracketing
Some more tests included.
2016-02-13 04:49:08 +01:00
Benjamin Otte
63d1f80742 css: Add support for '*' and '/' to calc()
More tests are included.
2016-02-13 04:49:08 +01:00
Benjamin Otte
4a9fa1e750 css: Add API to handle order when printing calc()
Also, add some tests and update old ones to print calc() statements
correctly.
2016-02-13 04:49:08 +01:00
Benjamin Otte
65dd9da44a css: Add support for sums to calc()
This requires adding code to do math on number values:
  gtk_css_number_value_multiply()
and
  gtk_css_number_value_try_add()
were added to achieve that.

Some tests are included.
2016-02-13 04:49:08 +01:00
Benjamin Otte
cd6dc954f2 css: Add initial support for calc()
So far, calc() only supports literals, ie it's completely useless.
2016-02-13 04:49:08 +01:00
Benjamin Otte
0c12601208 cssimageradial: Only allow at "<position>" after other props
Don't allow syntax like
  at top left circle
but follow the spec about requiring the at <position> right before the
comma.

This is porbably because
  circle at 10px 10px
could be interpreted as
  circle 10px at 10px
with the now disallowed syntax, too.

Test included.
2016-02-05 19:31:47 +01:00
Benjamin Otte
982da040b2 cssimageradial: Only emit one error for wrong position
Test included.
2016-02-05 19:31:47 +01:00
Matthias Clasen
586522d83c Use TAP output for installed tests 2016-01-30 11:04:22 -05:00
Matthias Clasen
fcea12f790 Add some tests for radial gradient parsing
These are the examples from the CSS spec.
2016-01-04 13:59:24 -05:00
Matthias Clasen
2b27096fc3 Fix outline-radius css parser test
The outline-radius properties all got a -gtk prefix.
2015-12-27 17:32:45 -05:00
Matthias Clasen
ab182126df Fix the pseudo-classes-known css test
The test needs to be updated for the renamed :dnd pseudo class.
We also need to add a .errors file for the deprecation errors
that we are now producing.
2015-12-27 17:32:30 -05:00
Matthias Clasen
c4ca671a9e test-css-parser: Add a way to generate output
Use test-css-parser --generate foo.css to see the parser
output on stdout. This makes it more convenient to add new
css files to the testsuite.
2015-12-27 17:26:45 -05:00
Matthias Clasen
d0d8671c02 Forgotten files 2015-12-23 01:57:22 -05:00
Matthias Clasen
ef71eabfc5 Add parser tests for animation properties
This adds tests for animation-name, animation-duration,
animation-timing-function, animation-iteration-count,
animation-direction, animation-play-state, animation-delay
and animation-fill-mode.
2015-12-22 22:29:38 -05:00
Matthias Clasen
8f44383253 Add a parser tests for transition properties
This adds tests for transition-property, transition-delay
and transition-timing-function.
2015-12-22 22:29:38 -05:00
Matthias Clasen
2b6ab1b8bd Add parser tests for min-width and min-height 2015-12-22 22:29:38 -05:00