gtk2/tests
Benjamin Otte 363dbb6039 reftests: Add
Add 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
2011-05-03 15:40:48 +02:00
..
dummy-headers Extend the C++ keyword test to include internal GDK headers (#449016). 2007-06-26 14:24:27 +00:00
reftests reftests: Add 2011-05-03 15:40:48 +02:00
test-images applied patch from maemo-gtk which avoids the allocation of an 2005-12-14 12:47:49 +00:00
3DRings.xpm Initial revision 1997-11-24 22:37:52 +00:00
apple-red.png Insert cast to fix warning. Assign something to old_value to quiet gcc 2003-07-03 01:02:04 +00:00
autotestfilesystem.c Revert name change 2008-07-01 22:57:50 +00:00
autotestkeywords.cc Don't include gdkwin32.h when testing Objective-C++ 2009-10-09 14:35:49 +03:00
cellareascaffold.c Minor documentation improvements 2011-02-23 10:26:21 +01:00
cellareascaffold.h Added tests to reflect proper treatment of background area. 2010-11-12 21:55:28 +09:00
check-n.xpm reworked the redrawing heuristics somewhat, this fixed a bunch of existing 1999-01-12 15:12:14 +00:00
check-y.xpm reworked the redrawing heuristics somewhat, this fixed a bunch of existing 1999-01-12 15:12:14 +00:00
FilesQueue.xpm Initial revision 1997-11-24 22:37:52 +00:00
flicker.c Don't use gtk_set_locale 2010-12-21 12:07:02 -05:00
gnome-textfile.png Add testiconview. A test for GtkIconView ...which uses this image. 2004-08-04 14:32:45 +00:00
gradient1.png Make styleexamples work 2011-01-03 12:34:23 -05:00
gtkoffscreenbox.c tests: Remove useless calls to gtk_widget_style_attach() 2011-01-11 16:46:59 +01:00
gtkoffscreenbox.h Add offscreen testcase 2009-04-02 10:14:04 +02:00
Makefile.am reftests: Add 2011-05-03 15:40:48 +02:00
makefile.msc win32: msvc build update 2011-02-06 15:07:12 +01:00
marble.xpm Initial revision 1997-11-24 22:37:52 +00:00
merge-1.ui Test handling of empty menus. 2003-09-30 20:55:24 +00:00
merge-2.ui Add UI manager attribute to always show image in menu items 2009-11-27 19:14:43 +01:00
merge-3.ui Change the XML format: <Root> element is replaced by <ui>, <menu> element 2003-08-27 22:22:28 +00:00
Modeller.xpm Initial revision 1997-11-24 22:37:52 +00:00
print-editor.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00
prop-editor.c tests: Update prop-editor adjustment usage for sealing 2011-01-05 23:50:22 +01:00
prop-editor.h perf/widgets.h tests/print-editor.c tests/prop-editor.h 2008-05-23 14:55:43 +00:00
simple.c Quell compiler warnings 2011-02-12 08:01:51 -05:00
stresstest-toolbar.c Use accessor functions to access GtkToolbar 2010-08-14 02:25:33 +02:00
styleexamples.c Make styleexamples work 2011-01-03 12:34:23 -05:00
test.xpm Initial revision 1997-11-24 22:37:52 +00:00
testaccel.c Renamed GtkCellRendererKeys to GtkCellRendererAccel to be consistent with 2005-09-22 16:33:50 +00:00
testactions.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00
testadjustsize.c Make GtkWidget::halign RTL-save 2011-03-30 10:34:02 -04:00
testappchooser.c Add a way to set the heading of GtkAppChooserDialog 2011-01-20 20:57:47 -05:00
testappchooserbutton.c Add gtk_app_chooser_button_get/set_heading 2011-01-24 19:25:08 -05:00
testapplication.desktop Add GtkApplication 2010-06-07 16:46:30 -04:00
testassistant.c tests: gtk_widget_render_icon() => gtk_widget_render_icon_pixbuf() 2010-12-15 14:51:26 +01:00
testbbox.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00
testbuttons.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00
testcairo.c c99ism: declaration in the mid of a block 2011-01-02 13:33:13 +01:00
testcalendar.c Make tests compile without using GtkStyle api 2010-12-04 15:39:46 +01:00
testcellarea.c tests: Use gtk_box_new() instead v/h subclasses 2011-04-22 14:44:02 +01:00
testcellrenderertext.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00
testcombo.c Silence more compiler warnings 2011-02-12 08:01:51 -05:00
testcombochange.c tests: Make test_init() not check for gdk-pixbuf anymore 2011-03-29 15:33:27 +02:00
testdnd.c tests: Make test_init() not check for gdk-pixbuf anymore 2011-03-29 15:33:27 +02:00
testellipsise.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00
testentrycompletion.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00
testentryicons.c Use standard icon names in demos and tests 2010-08-21 03:08:15 +02:00
testerrors.c Only store error codes in inner-most X error trap 2010-09-20 16:35:41 -04:00
testexpand.c Make GtkWidget::halign RTL-save 2011-03-30 10:34:02 -04:00
testexpander.c Add an expander-in-dialog example 2010-06-24 00:35:24 -04:00
testfilechooser.c Silence more compiler warnings 2011-02-12 08:01:51 -05:00
testfilechooserbutton.c Make GtkFileChooserButton behave as expected when expanding 2010-11-08 11:31:03 +09:00
testframe.c Make tests compile without using GtkStyle api 2010-12-04 15:39:46 +01:00
testgeometry.c GtkWindow: Allow setting size from geometry 2010-10-11 14:06:16 -04:00
testgiconpixbuf.c tests: fix the build 2010-11-08 11:31:01 +09:00
testgrid.c GtkGrid: Add forgotten RTL flipping 2011-03-30 08:19:30 -04:00
testgrouping.c (broken pipe) 2006-04-26 12:39:25 +00:00
testgtk2.css Make testgtk load CSS for custom styling. 2010-12-04 15:39:07 +01:00
testgtk.1 Added gtk/testgtk.1 man page for testgtk 1998-03-24 04:01:21 +00:00
testgtk.c tests/testgtk.c: Fix crash in cursor test 2011-05-02 18:20:23 +01:00
testgtk.css Add some bindings to testgtk.css for testing 2011-01-30 21:24:52 -05:00
testheightforwidth.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00
testicontheme.c Bug 347230 – testicontheme shortcomings 2008-10-31 08:56:42 +00:00
testiconview-keynav.c tests: Make testiconview-keynav set its custom style using CSS. 2010-12-15 14:51:26 +01:00
testiconview.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00
testimage.c tests: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:15 +00:00
testinput.c tests: Hardcode testinput colors instead of trying to use GtkStyle 2010-12-15 14:51:26 +01:00
testmenubars.c tests: Make testmenubars make all menubar items ellipsized 2011-05-01 04:44:56 +02:00
testmerge.c Add a GtkSwitch 2010-11-29 10:14:21 -05:00
testmountoperation.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 14:28:52 +00:00
testmultidisplay.c Use accessor functions to access GtkDialog 2010-07-13 19:40:47 +02:00
testmultiscreen.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00
testnoscreen.c Simple test for display-less widget creation 2011-02-04 22:06:25 -05:00
testnotebookdnd.c Don't use GtkNotebook:tab-pack in testnotebookdnd 2011-01-04 00:55:50 -05:00
testnouiprint.c Silence more compiler warnings 2011-02-12 08:01:51 -05:00
testnumerableicon.c Add GtkNumerableIcon 2011-01-05 16:33:15 -05:00
testoffscreen.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00
testoffscreenwindow.c tests: Connect to draw signal in testoffscreenwindow 2010-09-26 15:11:40 +02:00
testorientable.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00
testprint.c Revert name change 2008-07-01 22:57:50 +00:00
testprintfileoperation.c Further updates from the GtkPrintContext functions rename. 2006-05-31 14:06:02 +00:00
testprintfileoperation.h perf/widgets.h tests/print-editor.c tests/prop-editor.h 2008-05-23 14:55:43 +00:00
testrc.c Revert name change 2008-07-01 22:57:50 +00:00
testrecentchooser.c Silence more compiler warnings 2011-02-12 08:01:51 -05:00
testrecentchoosermenu.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00
testrichtext.c Fix C89 compilation issue. (#467711, The Written Word) 2007-11-21 09:32:35 +00:00
testscale.c Add a test for interpretation of mark positions 2011-03-03 13:48:34 -05:00
testscrolledwindow.c tests: missed these two gtk_box_new() which sneaked in by rebasing... 2010-11-02 12:04:35 +09:00
testselection.c tests: Use accessor functions to access GtkSelectionData 2010-12-15 23:58:15 +00:00
testsensitive.c Add a testcase for state propagation problems 2011-02-06 14:14:48 -05:00
testsocket_child.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 14:28:52 +00:00
testsocket_common.c Merge branch 'master' into broadway 2011-02-11 15:27:54 +01:00
testsocket.c Add a gtkx.h header for X11-specific GTK+ api 2011-01-29 14:16:47 -05:00
testspinbutton.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00
teststatusicon.c Use standard icon names 2011-02-11 23:53:39 -05:00
testswitch.c Add GtkSwitch, a "light-switch" like widget 2010-11-29 12:52:10 +00:00
testthreads.c Use gtk_box_new() instead gtk_[v|h]box_new() 2010-10-30 17:37:03 +09:00
testtoolbar.c tests: Remove refreh button from testtoolbar test 2011-02-01 06:33:02 +01:00
testtooltips.c Removed all variables from GtkTreeViewColumn and created GtkTreeViewColumnPrivate 2010-12-05 22:11:08 +09:00
testtoplevelembed.c tests: Use gtk_box_new() instead v/h subclasses 2011-04-22 14:44:02 +01:00
testtreecolumns.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00
testtreecolumnsizing.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00
testtreeedit.c tests: Use gtk_box_new() instead v/h subclasses 2011-04-22 14:44:02 +01:00
testtreeflow.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00
testtreefocus.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00
testtreemenu.c tests: Use gtk_box_new() instead v/h subclasses 2011-04-22 14:44:02 +01:00
testtreemodel.c Include "config.h" instead of <config.h> Command used: find -name 2008-06-22 14:28:52 +00:00
testtreepos.c Demonstrate the problem with a workaround 2011-02-05 10:58:50 -05:00
testtreesort.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00
testtreeview-plan.txt handle case where there are no rows in the model 2001-01-09 17:45:34 +00:00
testtreeview.c Make testtreeview handle RTL environment variable for testing 2010-12-15 21:36:47 +01:00
testverticalcells.c Delimit the other_entries array 2010-12-23 18:19:55 +01:00
testvolumebutton.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00
testwindows.c Make tests compile without using GtkStyle api 2010-12-04 15:39:46 +01:00
testxinerama.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00
treestoretest.c gtk: remove "gboolean homogeneous" from gtk_box_new() 2010-11-02 12:04:35 +09:00