gtk2/testsuite/reftests
Matthias Clasen ab7b83d97c typo fix
2013-06-29 19:55:14 -04:00
..
align-expand.sh
alignment-props.css
alignment-props.ref.ui
alignment-props.ui
background-area.css
background-area.ref.ui
background-area.ui
background-color-transparent.css
background-color-transparent.ref.ui
background-color-transparent.ui
background-image-multiple.css
background-image-multiple.ref.ui
background-image-multiple.ui
background-origin.css
background-origin.ref.ui
background-origin.ui
background-position-repeat-bg.png
background-position-repeat.css
background-position-repeat.ref.ui
background-position-repeat.ui
background-position-simple.css
background-position-simple.ref.ui
background-position-simple.ui
background-position.css
background-position.ref.ui
background-position.ui
background-positioning-area-empty.ref.ui
background-positioning-area-empty.ui
background-repeat.css
background-repeat.ref.ui
background-repeat.ui
background-size-keywords.css
background-size-keywords.ref.ui
background-size-keywords.ui
background-size-zero.css
background-size-zero.ref.ui
background-size-zero.ui
background-size.css
background-size.ref.ui
background-size.ui
background-window-transparent.css
background-window-transparent.ref.ui
background-window-transparent.ui
bad-color-names.css
bad-color-names.ref.ui
bad-color-names.ui
border-color-default.css
border-color-default.ref.ui
border-color-default.ui
border-half-pixel.css
border-half-pixel.ref.ui
border-half-pixel.ui
border-image-3-balls-green.png
border-image-3-balls-yellow.png
border-image-ball-green.png
border-image-ball-red.png
border-image-ball-yellow.png
border-image-balls.png
border-image-excess-size.css
border-image-excess-size.ref.ui
border-image-excess-size.ui
border-image-gradient.css
border-image-gradient.ref.ui
border-image-gradient.ui
border-image-repeat.css
border-image-repeat.ref.ui
border-image-repeat.sh
border-image-repeat.ui
border-image-url.css
border-image-url.ref.ui
border-image-url.ui
border-radius-clamp.css
border-radius-clamp.ref.ui
border-radius-clamp.ui
border-style-none.css
border-style-none.ref.ui
border-style-none.ui
border-style.css
border-style.ref.ui
border-style.ui
box-expand.css
box-expand.ref.ui
box-expand.ui
box-packing.css
box-packing.ref.ui
box-packing.ui
box-pseudo-classes.css
box-pseudo-classes.ref.ui
box-pseudo-classes.ui
box-shadow-spec-inset.css
box-shadow-spec-inset.ref.ui
box-shadow-spec-inset.ui
button-wrapping.ref.ui
button-wrapping.ui
css-match-class.css
css-match-class.ref.ui
css-match-class.ui
css-match-descendant-later.css
css-match-descendant-later.ref.ui
css-match-descendant-later.ui
css-match-exact.css
css-match-exact.ref.ui
css-match-exact.ui
css-match-import-import.css
css-match-import.css
css-match-import.ref.ui
css-match-import.ui
css-match-inherit-different-state.css
css-match-inherit-different-state.ref.ui
css-match-inherit-different-state.ui
css-match-inherit.css
css-match-inherit.ref.ui
css-match-inherit.ui
css-match-name.css
css-match-name.ref.ui
css-match-name.ui
css-match-region-matches-star.css
css-match-region-matches-star.ref.ui
css-match-region-matches-star.ui
css-match-regions.css
css-match-regions.ref.ui
css-match-regions.ui
css-match-siblings.css
css-match-siblings.ref.ui
css-match-siblings.ui
css-match-style-property-order.css
css-match-style-property-order.ref.ui
css-match-style-property-order.ui
css-match-subtype.css
css-match-subtype.ref.ui
css-match-subtype.ui
css-match-type.css
css-match-type.ref.ui
css-match-type.ui
css-multi-state.css reftests: Fix for state propagation changes 2013-06-13 15:31:35 +02:00
css-multi-state.ref.ui reftests: Fix for state propagation changes 2013-06-13 15:31:35 +02:00
css-multi-state.ui reftests: Fix for state propagation changes 2013-06-13 15:31:35 +02:00
entry-progress-coloring.css
entry-progress-coloring.ref.ui
entry-progress-coloring.ui
font-sizes-names.css
font-sizes-names.ref.ui
font-sizes-names.ui
green-20x20.png
grid-empty-with-spacing.ref.ui
grid-empty-with-spacing.ui
grid-expand.css
grid-expand.ref.ui
grid-expand.ui
grid-homogeneous.css
grid-homogeneous.ref.ui
grid-homogeneous.ui
grid-spacing1.ref.ui
grid-spacing1.ui
grid-spacing2.ref.ui
grid-spacing2.ui
grid-spacing3.css
grid-spacing3.ref.ui
grid-spacing3.ui
grid-wfh.ref.ui
grid-wfh.ui
gtk-reftest.c typo fix 2013-06-29 19:55:14 -04:00
iconview-empty.css
iconview-empty.ref.ui Fix iconview-empty reftest 2013-06-15 21:31:41 -04:00
iconview-empty.ui
image-load-from-file.css
image-load-from-file.ref.ui
image-load-from-file.ui
info-bar-message-types.css
info-bar-message-types.ref.ui
info-bar-message-types.ui
inherit-and-initial.css
inherit-and-initial.ref.ui Don't use stock APIs in the testsuite 2013-06-24 19:53:08 -04:00
inherit-and-initial.ui Don't use stock APIs in the testsuite 2013-06-24 19:53:08 -04:00
label-attribute-preference.css
label-attribute-preference.ref.ui
label-attribute-preference.ui
label-ellipsize-small.ref.ui
label-ellipsize-small.ui
label-ellipsize-with-big.ref.ui
label-ellipsize-with-big.ui
label-shadows.css
label-shadows.ref.ui
label-shadows.ui
label-sizing.css
label-sizing.ref.ui
label-sizing.ui
label-small-ellipsized.ref.ui
label-small-ellipsized.ui
label-width-chars-dont-shrink.ref.ui
label-width-chars-dont-shrink.ui
label-wrap-justify.ref.ui
label-wrap-justify.ui
linear-gradient-transition-to-other.css
linear-gradient-transition-to-other.ref.ui
linear-gradient-transition-to-other.ui
linear-gradient.css
linear-gradient.ref.ui
linear-gradient.ui
Makefile.am build: fix typo 2013-05-30 20:19:49 +02:00
marble.xpm
messagedialog-secondarytext.ref.ui
messagedialog-secondarytext.ui
misc-alignment.css
misc-alignment.ref.ui
misc-alignment.ui
named-colors.css
named-colors.ref.ui
named-colors.ui
no-colors.css
no-colors.ref.ui
no-colors.ui
nonresizable-size.ref.ui
nonresizable-size.ui
notebook-childproperties.css
notebook-childproperties.ref.ui
notebook-childproperties.ui
nth-child.css
nth-child.ref.ui
nth-child.ui
opacity.css
opacity.ref.ui
opacity.ui
paned-undersized.css
paned-undersized.ref.ui
paned-undersized.ui
quit-mnemonic.css
quit-mnemonic.ref.ui
quit-mnemonic.ui
README
reference-background-origin.png
reftests.test.in reftests: Switch test type to session-exclusive 2013-05-31 10:34:11 -04:00
reset-to-defaults.css
rotated-layout.ref.ui
rotated-layout.ui
separator-size.ref.ui Don't use stock APIs in the testsuite 2013-06-24 19:53:08 -04:00
separator-size.ui Don't use stock APIs in the testsuite 2013-06-24 19:53:08 -04:00
shorthand-entry-border.css
shorthand-entry-border.ref.ui
shorthand-entry-border.ui
simple.ref.ui
simple.ui
sizegroups-basics.css
sizegroups-basics.ref.ui
sizegroups-basics.ui
sizegroups-evolution-identity-page.ref.ui
sizegroups-evolution-identity-page.ui
sizegroups-get-preferred-null.ref.ui
sizegroups-get-preferred-null.ui
style-properties-nth-child.css
style-properties-nth-child.ref.ui
style-properties-nth-child.ui
style-properties-only-child.css
style-properties-only-child.ref.ui
style-properties-only-child.ui
toplevel-vs-popup.ref.ui
toplevel-vs-popup.ui
treeview-fixed-height.css
treeview-fixed-height.ref.ui
treeview-fixed-height.ui
treeview-headers-hidden.ref.ui
treeview-headers-hidden.ui
unresolvable.css
unresolvable.ref.ui
unresolvable.ui
window-border-width.ref.ui
window-border-width.ui
window-default-size.ref.ui
window-default-size.ui

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