Files
gtk/testsuite/reftests
Benjamin Otte 9ec22d6652 reftests: Always wait for rendering to settle
We wait for a few 100ms for rendering to settle in various WMs. So far
we only did that for windows that were controlled by the WM (aka
toplevels).

With modern compositing gnome-shell however, this now also applies to
override-redirect windows, so we now wait there, too.

This makes the reftests a lot slower, but they now actually work when
running make check in gnome-shell.
2017-08-02 11:34:57 +01:00
..
2017-04-25 20:30:37 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2017-04-25 20:30:37 +02:00
2016-04-12 16:59:40 -07:00
2015-10-27 20:06:24 -04:00
2015-10-27 20:06:24 -04:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2015-10-27 20:06:24 -04:00
2016-10-18 00:34:41 +02:00
2016-10-18 00:34:41 +02:00
2016-04-12 16:59:40 -07:00
2016-04-12 16:59:40 -07:00
2014-06-02 22:36:01 -04:00
2016-01-30 21:11:12 -05:00
2017-04-25 20:30:37 +02:00
2015-10-27 20:06:24 -04:00
2017-04-25 20:30:37 +02:00
2015-10-27 20:06:24 -04:00
2017-05-10 11:37:40 +01:00
2017-04-25 20:30:37 +02:00
2015-10-27 20:06:24 -04:00
2017-08-02 11:34:57 +01:00
2017-04-25 20:30:37 +02:00
2017-08-02 11:34:57 +01:00
2017-08-02 11:34:57 +01:00
2015-10-27 20:06:24 -04:00
2014-06-15 18:15:43 +02:00

gtk-reftest is a new test runner supposed to do a lot of generic tests.
Run it like this:

./gtk-reftest [OPTIONS] TESTFILE [TESTFILES...]

where FILE is a GtkBuilder ui file to run.

For a general test named "test", you want to have the following files:
1) test.ui
2) test.ref.ui
3) test.css (optional)
The test will then check that test.ui and test.ref.ui are rendered
identically with the provided css.

In detail, for every provided TESTFILE the test runner will:
1) Add the css to the default screen
2) Load the test.ui file and the test.ref.ui file
3) Grab the first GtkWindow subclass widget
4) gtk_widget_show() it and take a snapshot image of its contents into
   a cairo surface.
5) Compare the two images to be bitwise identical. If they are not, a
   diff image will be created hilighting the differences.
6) Save the images as png files to the output directory named:
   - test.out.png (rendering of test.ui)
   - test.ref.png (rendering of test.ref.ui)
   - test.diff.png (optional, differences from step 5)
7) Fail the test if the two images are not bitwise identical

Credit for the idea of reftests goes to Mozilla and in particular David
Baron. For a larger introduction of why reftests are useful, see
http://weblogs.mozillazine.org/roc/archives/2008/12/reftests.html