Commit Graph

277 Commits

Author SHA1 Message Date
Matthias Clasen
3da76c1e14 Disable deprecation warnings for installed reftests
Otherwise, these fail in continuous.
2014-06-28 11:13:17 -04:00
Matthias Clasen
b9bd7159c0 Disable deprecation warnings in tests
We want to test deprecated properties, so failing the tests with
warnings is not productive.
2014-06-25 16:29:08 -04:00
Richard Hughes
12e389dd3c Makefile: Actually dist the high-contrast and dark test files 2014-06-24 21:18:46 +01:00
Jasper St. Pierre
38a6a72a7f Makefile: Add a few more cleanfile / ignore rules 2014-06-16 14:03:53 -04:00
Paolo Borelli
715b8744f5 TextView: render the background of border windows
Set the .top, .left, etc css classes and render the background
of the border windows.
Change the reftest implementation accordingly.
2014-06-15 18:57:06 +02:00
Paolo Borelli
2eeff1eed6 Add a TextView reftests checking border-windows
TextView border windows are internal windows used to draw on the gutter
of the textview (e.g. line numbers). The test uses the gmodule hook to
programmatically draw on the border-windows at each side of the textview
and compares the result with 3x3 grid of labels.
2014-06-15 18:56:30 +02:00
Paolo Borelli
2c5be3b231 TextView margin reftest
add a reftest that checks GtkTextView text margin property comparing
with the normal margin added to the widget (they are the same when there
is nothing drawn in the gutter like line numbers etc).
2014-06-15 18:15:43 +02:00
Paolo Borelli
570653354a Dist recently added reftests 2014-06-15 12:05:40 +02:00
Paolo Borelli
c184458ab3 notebook: set tab position style class on the main frame
We want to have .top etc also on the notebook frame, not only on
the header frame.
The patch includes a reftest by Benjamin.
2014-06-14 21:37:07 +02:00
Benjamin Otte
bb3174c913 reftests: Fix random failures of reftest
The reftest is testing "transparent" works as expected by drawing a
purple background once with purple and once with transparent and
expecting the same result. This works fine unless anti-aliasing happens
at rounded corners. The overdraw of the 2nd background changes the
antialiased pixels.

Fix this by explicitly setting the border radius to 0.

Also reindent the file to make it more readable.
2014-06-09 19:18:48 +02:00
Matthias Clasen
c11b7e44a0 label-sizing reftest: Hardcode ltr
This reftest doesn't work in rtl.
2014-06-03 12:28:06 -04:00
Matthias Clasen
ac59f0ac08 reftests: Add a way to hardcode text direction
Some tests don't work in rtl, so add a way to hardcode
the expected text direction. This is in preparation for
running reftests in an rtl locale.
2014-06-03 12:28:06 -04:00
Benjamin Otte
45dbd84ff3 reftests: Use "all" property in inherit-and-inital test 2014-06-03 14:35:00 +02:00
Matthias Clasen
42945f0d74 Run reftests repeatedly
Install test files that run the reftests in the
Adwaita:dark and HighConstrast themes. It works,
so why not.
2014-06-02 22:46:23 -04:00
Matthias Clasen
7f8d0552f0 Drop debug spew from installed tests
This is no longer needed, we found the problem.
2014-06-02 22:37:29 -04:00
Matthias Clasen
5bebbb06fa Add an expander reftest
This test check that resizing the window when expanding
the expander yields the same end result as having the
expander expanded to begin with. The test uses the inhibit
mechanism introduced in the previous commit.
2014-06-02 22:36:01 -04:00
Matthias Clasen
b86f5a4086 Add a way to delay snapshots in reftests
This adds an inhibit api that code from the reftest module
can use to delay the taking of the snapshot. Also refactor
the code in gtk-reftest to use the inhibit mechanism for
its own delaying of the snapshot until after the first
expose.
2014-06-02 22:35:59 -04:00
Matthias Clasen
16c89eb5f7 Forgotten file 2014-06-02 21:43:04 -04:00
Matthias Clasen
94c065d647 Add a reftest for flipping icons
Taking advantage of our new direction flipping ability.
2014-06-02 21:41:32 -04:00
Benjamin Otte
86267fd9bd gtk-reftest: Add GMODULE_CFLAGS/LIBS
They aren't included in GTK_DEP_CFLAGS/LIBS so they need to be added
manually.
2014-05-31 14:40:13 +02:00
Matthias Clasen
98cf67ddba testsuite: put installed tests in the right place
Follow the prevailing practice and put the installed tests
into $libdir/installed-tests/$PACKAGE instead of
$pkglibdir/installed-tests.
2014-05-31 00:16:07 -04:00
Matthias Clasen
5880c9e365 gtk-reftest: Don't warn needlessly
Only warn about the --direction argument if the option was
actually specified.
2014-05-30 23:30:56 -04:00
Benjamin Otte
a18ec83b3b reftests: Add reftest for direction change
This reftest makes use of the new feature to add signal handlers.

It adds a libreftest.so module containing all the code for the reftests.
When adding a test named reftest.ui, please keep code contained in a
source file names reftest.c and add that file to Makefile.am.

https://bugzilla.gnome.org/show_bug.cgi?id=730833
2014-05-31 05:19:41 +02:00
Benjamin Otte
690fb31fb4 gtk-reftest: Clarify --direction argument parameters
... and print a proper error message when the parameter is not
recognized.
2014-05-31 05:19:41 +02:00
Benjamin Otte
8bba9b6a4a gtk-reftest: Allow loading code for reftests
When connecting signal names, gtk-reftest now allows you to use a colon
in the signal handler name like so:
  module:function_name
where module is a module loaded from the same directory (or the .libs
subdirectory for compatibility with uninstalled libtool) as the running
test and the function is resolved in that module. Of course, normal
function names work as before.
2014-05-31 05:19:41 +02:00
Benjamin Otte
030140ccc4 reftests: Add a reftest with signals 2014-05-31 05:19:40 +02:00
Benjamin Otte
1e4fea7ca9 reftests: Automatically connect signals 2014-05-31 05:19:40 +02:00
Matthias Clasen
28c04f4be3 testsuite: Run reftests with GTK_DEBUG=icontheme
This will hopefully help to track down some hard-to-squash
failures that only happen in gnome-continuous.
2014-05-23 11:38:24 -04:00
Benjamin Otte
0eb62c1629 reftests: Fix icon-vfuncs reftest
The reftest broke when font size lead to labels > 16px.
2014-05-22 22:35:08 +02:00
Jasper St. Pierre
76e18de811 reftests: Remove the css-match-style-property-order test
It was testing -GtkWidget-focus-line-width, which is a dead property
we don't use anymore.
2014-05-22 14:47:55 -04:00
Jasper St. Pierre
845f29ccf5 reftests: Fix some more easy GtkButton shadow cases 2014-05-22 11:46:07 -04:00
Benjamin Otte
b1a7aa49b3 reftests: Fix background-area test
The test should include reset-to-defaults.css but apparently it is older
than that file. So it broke when buttons started using shadows.
2014-05-22 17:38:50 +02:00
Benjamin Otte
5e07b80854 reftests: Add a test for recent commits
Check that icon-shadow is not affected by -gtk-icon-transform.
2014-05-14 04:28:35 +02:00
Benjamin Otte
59b6dee480 reftest: Add tests for the new vfuncs
This test is a bit brittle because it doesn't properly rely on CSS
properties but needs to use widget style properties to turn of extra
sizing from widgets.

It might break in the future when porting widgets to draw properly.
2014-05-14 04:28:35 +02:00
Benjamin Otte
f0a5cebe23 reftests: Add a reftest for -gtk-icon-style 2014-05-14 04:28:34 +02:00
Benjamin Otte
0e462f0d2d css: Implement "all" shorthand
Here's the spec:
  http://dev.w3.org/csswg/css-cascade/#all-shorthand

Also use it in the reset-to-defaults CSS where a bunch of properties had
been missing.
2014-05-11 03:23:55 +02:00
Benjamin Otte
3a72e2fb24 css: Implement "unset"
Quoting the spec:
  If the cascaded value of a property is the unset keyword,
  then if it is an inherited property, this is treated as
  inherit, and if it is not, this is treated as initial.

Spec in question:
  http://dev.w3.org/csswg/css-cascade/

Also use unset in the reset-to-defaults.css we use to reset css in
reftests.
2014-05-11 03:23:55 +02:00
Benjamin Otte
f2258cb05c reftests: Create the surface after running the main loop
Running the main loop may cause resizes, so creating the surface based
on the size before running it seems wrong.
2014-05-11 03:23:55 +02:00
Cosimo Cecchi
ce8846521e reftests: never set interior-focus 2014-05-09 11:02:42 -07:00
Benjamin Otte
f0ebb15dab reftests: Add test for latest commit
Check that the label gets linebroken properly.
2014-04-29 19:36:26 +02:00
Benjamin Otte
01fe1282fc reftests: Remove unused argument from function 2014-03-05 21:03:36 +01:00
Benjamin Otte
2dd3226c67 reftests: Add a test for a widget stacking regression
GTK 3.10 fails to obey the stacking order when drawing widgets.

https://bugzilla.gnome.org/show_bug.cgi?id=725089
2014-02-28 03:08:11 +01:00
Benjamin Otte
7a603c6909 reftests: Add reftest for last commit
https://bugzilla.gnome.org/show_bug.cgi?id=724999
2014-02-23 15:40:46 +01:00
Benjamin Otte
118969e70a reftests: Add a reftest for the latest fix
https://bugzilla.gnome.org/show_bug.cgi?id=724742
2014-02-20 02:10:07 +01:00
Matthias Clasen
55269cdc73 Adjust action ref test to new realities
The test was using a nonexisting GtkActionBar::spacing property.
2014-02-16 23:03:38 -05:00
Matthias Clasen
a91a793468 Give up on border-image-repeat reftest 2014-02-04 13:15:46 -05:00
Matthias Clasen
1faf3a0aaa Use the memory settings backend for make check
The color chooser test is constantly running into the
problem that the custom color setting is not empty.
Avoid that by using the memory settings backend.
2014-01-21 21:17:14 -05:00
Matthias Clasen
3c12f6da1f Make the action bar reftest reliable 2014-01-14 14:05:37 -05:00
Benjamin Otte
60968a1fec reftests: Add reftest for 0px border fix
https://bugzilla.gnome.org/show_bug.cgi?id=721800
2014-01-14 03:38:04 +01:00
Matthias Clasen
851d5f1c7d Add a reftest for GtkActionBar child ordering
This shows that GtkActionBar and GtkBox treat pack-start/-end
the same.
2014-01-07 19:05:40 -05:00
Benjamin Otte
6524d0b83d reftests: Fix rendering issues with border-image reftest
When downscaling images, Cairo apparently uses algorithms different
enough to make this test trip over. So add the downscaled image as the
reference instead of downscaling the previous reference image.

Fixes the border-image reftest. For real now.
2013-11-19 02:29:48 +01:00
Benjamin Otte
542bd31d00 reftests: Fix border-image-repeat test
The new downscaling code in Cairo doesn't allow this test, so we remove
the CSS that made the border downscaled.

So the test does test less now, but it still tests the repeat modes of
border images.
2013-11-19 02:29:48 +01:00
Yosef Or Boczko
719dd636a9 Replace all margin-left and margin-right with margin-start and margin-end
https://bugzilla.gnome.org/show_bug.cgi?id=710238
2013-11-15 02:54:35 +01:00
Benjamin Otte
4244f9258f reftests: Fix CSS for tests after :link introduction 2013-11-09 16:43:06 +01:00
Benjamin Otte
daf37ffa0e reftests: Add test for new :link and :visited
We cannot test visited links in GtkLabel, so we don't.
2013-11-04 16:36:11 +01:00
Paolo Borelli
88e2c0ee69 Fix "make install"
These files were listed twice
2013-11-02 12:15:34 +01:00
Jasper St. Pierre
77ee6765a0 reftests: Add missing reftests to the test runner 2013-11-01 16:51:31 -04:00
Benjamin Otte
dd01e05ceb reftests: Add a test for the symbolic color fix 2013-10-05 13:57:51 +02:00
Benjamin Otte
9be26ee99a reftests: I can't count in CSS
nth-child() is 1-indexed, not 0-indexed.

It doesn't matter for this test really, but better do it right to not confuse
poor developers who wonder why the first image is highlighted when nth-child(0)
clearly states "none".
2013-09-07 00:23:38 +02:00
Benjamin Otte
3b2ea63b56 reftests: Check that -gtk-image-effect is inherited 2013-09-07 00:21:48 +02:00
Benjamin Otte
967abf53fd reftests: Add test for just fixed Polari crasher 2013-09-06 03:04:44 +02:00
Benjamin Otte
a13d5aefc3 reftests: Add a reftest for the cell renderer fix
The reftest is a bit flaky because it compares cell renderers with
GtkImage and therefor an icon view with a GtkBox, but it's the best I
can come up with.

https://bugzilla.gnome.org/show_bug.cgi?id=702423
2013-09-05 18:48:47 +02:00
Benjamin Otte
7b564cd7ed reftests: Fix broken reftest
GtkMenuItem has no accel group.
2013-07-16 00:58:46 +02:00
Jasper St. Pierre
4e09b56b76 testsuite: Ignore generated .test files 2013-07-11 12:57:06 -04:00
Alexander Larsson
d08a12ae0b reftest: Add reftest for scaled image borders - fails on GDK_SCALE=2 2013-07-05 15:21:55 +02:00
Benjamin Otte
f0a8d11563 reftests: Add a reftest for the expand change in GtkBox
The change was introduced in 80513aa2c7

See that commit for details.
2013-06-30 03:39:09 +02:00
Matthias Clasen
39f95f1b9b Add a --direction option to gtk-reftest
gtk_test_init() hardcodes the locale to "C", so the --direction
option is useful to check reftests in rtl.
2013-06-29 20:03:29 -04:00
Matthias Clasen
ab7b83d97c typo fix 2013-06-29 19:55:14 -04:00
William Jon McCann
3224e72bc1 Don't use stock APIs in the testsuite 2013-06-24 19:53:08 -04:00
Matthias Clasen
2220845b2b Fix iconview-empty reftest
The reference image for this test was inadvertedly relying
on an incorrect initial icon-size property of GtkImage.
2013-06-15 21:31:41 -04:00
Benjamin Otte
860639e796 reftests: Fix for state propagation changes 2013-06-13 15:31:35 +02:00
Colin Walters
154a5e55ab reftests: Switch test type to session-exclusive
The reftests are sensitive to window focus, and will not work reliably
if other concurrently executed tests are creating and closing windows.
2013-05-31 10:34:11 -04:00
Rico Tzschichholz
2812f782b3 build: fix typo 2013-05-30 20:19:49 +02:00
Matthias Clasen
c8a392612b Use g_test_get_dir in test to locate files
This makes the tests work both installed and for make check.
2013-05-29 21:37:05 -04:00
Matthias Clasen
0d768ee8a8 Make sure we dist all testsuite ingredients 2013-05-29 21:00:37 -04:00
Benjamin Otte
cbeda47591 reftests: Add test for last 2 commits 2013-05-28 15:24:04 +02:00
Benjamin Otte
172303f550 build: Move tests/reftests to testsuite/reftests 2013-05-15 15:37:17 +02:00