Commit Graph

31 Commits

Author SHA1 Message Date
Benjamin Otte
2e48bb2ccd tests: Add checks for row/column index to accessibility-dump 2011-11-16 04:39:25 +01:00
Benjamin Otte
74e8ac1208 tests: Don't dump stuff twice for tables
Captions and headers are printed as part of the children, so we can
avoid the duplication by just printing the name.
2011-11-16 04:39:25 +01:00
Javier Jardón
0853ce3077 Use G_VALUE_INIT
Instead of an explicit { 0, } when declaring the variable.
2011-10-15 16:45:16 +01:00
Benjamin Otte
2f744db943 tests: Don't print selection count
Selection count is tested via assertions and can be inferred from
looking at the number of selected children.

And I'd like to reduce the output of the tests. We're outputting way too
much anyway.
2011-07-05 16:08:56 -04:00
Benjamin Otte
e0324064bc tests: Make accessibility-dump output selected children by name
And put one child in every row to make diffing easier.
2011-07-05 16:08:56 -04:00
Benjamin Otte
4ca42d9785 tests: Fix compiler warnings 2011-07-05 16:08:56 -04:00
Benjamin Otte
3ea8cfc02f tests: Add assert to accessibility-dump
Check that number of selected children == number of children that
actually are selected. If that's not the case, assert, to avoid people
being careless about adding tests.
2011-07-05 16:08:56 -04:00
Matthias Clasen
db2da1de42 Sort text attributes alphabetically in dumps 2011-07-05 16:08:07 -04:00
Benjamin Otte
d346be96c2 tests: Don't emit a message for every unnamed object 2011-07-05 16:08:04 -04:00
Benjamin Otte
4c0814a176 tests: Reset the unnamed counter before a test run
This guarantees that objects are named the same all the time.
2011-07-05 16:08:04 -04:00
Benjamin Otte
26a2cfe62a tests: Fix crash due to freeing random pointers 2011-07-05 16:08:04 -04:00
Matthias Clasen
5ebbf00f0a Try harder to generate names for accessibles
We are still hitting the 'no name' case in GtkFileChooser for
a GailBox, otherwise.
2011-07-05 16:08:02 -04:00
Matthias Clasen
dbf204b5b9 Handle AtkValue implementations that return integer values
We do this by transforming the returned GValue to a string.
As a side-effect, the formatting for doubles changes, so
adjust expected output to match.
2011-07-05 16:08:01 -04:00
Benjamin Otte
98a11cedf0 tests: omit fg-color and bg-color values from attributes
They depend on the environment, too.
2011-07-05 16:08:01 -04:00
Benjamin Otte
b6bd3ef4f4 tests: Add line breaks when dumping text attributes
This improves diff readability a lot when attributes differ.
2011-07-05 16:08:01 -04:00
Matthias Clasen
eb60a7ed54 Dump AtkTable properties
Also, make get_name() deal better with GtkAccessibles whose
widgets don't have buildable names.
2011-07-05 16:08:00 -04:00
Matthias Clasen
52aa225713 Dump AtkComponent properties
Note that the spatial aspects of AtkComponent are all dependent
on fonts and other environmental factors, thus we only dump the
little bits outside of that.
2011-07-05 16:08:00 -04:00
Matthias Clasen
570c185935 Make the dumped output a bit more readable
By adding sections for each interface.
2011-07-05 16:08:00 -04:00
Matthias Clasen
901395db67 Dump AtkStreamableContent properties
Also, simplify the format for links slightly.
2011-07-05 16:08:00 -04:00
Matthias Clasen
97ddbb5ff2 Dump AtkHyperLinkImpl properties 2011-07-05 16:07:59 -04:00
Matthias Clasen
2672a3afef Dump AtkValue properties 2011-07-05 16:07:59 -04:00
Matthias Clasen
913c5241ae Dump AtkSelection properties
Also make get_name() deal with object that are not GtkAccessible,
but implement AtkText. An example of this is GailNotebookPage.
2011-07-05 16:07:59 -04:00
Matthias Clasen
a6d741b6a4 Dump AtkAction properties
Adjust expected output to match.
2011-07-05 16:07:59 -04:00
Matthias Clasen
22fc55f716 Dump AtkImage properties too
Update expected output to match.
2011-07-05 16:07:59 -04:00
Matthias Clasen
58b4b410fa More text properties 2011-07-05 16:07:59 -04:00
Matthias Clasen
76f71b8f9c Dump AtkText properties too
...would be nice if these actually _were_ properties.
Update the expected output to match.
2011-07-05 16:07:58 -04:00
Matthias Clasen
bd6b799d26 Fix make check
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.
2011-07-05 16:07:58 -04:00
Matthias Clasen
5952c6abbb Don't forget to free an empty attribute set 2011-07-05 16:07:58 -04:00
Matthias Clasen
f3ae93af95 Add a more convenient way to dump
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.
2011-07-05 16:07:58 -04:00
Matthias Clasen
d36d6172d2 Dump more accessibility data
This commit adds dumping of parents, attributes and states.
The expected dump output has been adjusted to match.
2011-07-05 16:07:58 -04:00
Benjamin Otte
f76c439897 tests: Add first shot at an accessibility dump tool
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.
2011-07-05 16:07:57 -04:00