Not really the best fix; for now just ignore accessible parents
that are not GtkAccessibles - it seems that something causes
GailToplevels to show up as parents of GailWindows, randomly.
For initial creation of the results, allow to run
accessibility-dump --generate file.ui,
which will dump just the expected output to stdout,
without any extra decorations.
The tool works like this:
./accessibility-dump [FILE ...]
If no files are given, all files with the extension ".ui" in the current
directory are taken. For every file "test.ui", the following steps are
performed:
1) test.ui is loaded using GtkBuilder
2) The accessible for the window is loaded
3) The information of accessible is converted into a string using a
syntax defined in this test file
4) The generated string is diffed with the file "test.txt"
5) If the diff is empty, the test is a success, if not, the test fails.
6) The diff is output when the test runner is run with --verbose
So to add a test named "test", create a file called "test.ui", put it
into this directory. Then create the expected output file "test.txt",
put it into this directory too. You can create the initial version of
this file by invoking "./accessibility-dump --verbose test.ui". The
output will contain the expected text and can be copy/pasted into the
text file.
When tests are larger than the screen size and no compositing is
enabled, the window will be clipped to the screen size and all areas
outside of the screen have undefined contents.
To avoid this, we can use an offscreen window.
This test is copied from the CSS spec. The reference is very sensitive
to the rendering algorithm in use, because the rounded corners have
semi-transparent pixels. It might be necessary to update them in the
future.
Tests that border-image-repeat is rendered correctly.
The reftest is done via toolbars stuffed into a GtkFixed using
background-image and images tuned for it.
We need pay attention the the request mode when doing size allocation.
The code was using request mode for requisition, but orientation
for allocation.
Also add a reftest that exhibits the issue, courtesy of
Benjamin Otte.