That test is not working anymore by design since commit 57c4f01e.
It was introduced pre-3.0.0 in commit 12d6b588 and the feature was never
utilized. So it seems safe to just remove the test.
TextView border windows are internal windows used to draw on the gutter
of the textview (e.g. line numbers). The test uses the gmodule hook to
programmatically draw on the border-windows at each side of the textview
and compares the result with 3x3 grid of labels.
add a reftest that checks GtkTextView text margin property comparing
with the normal margin added to the widget (they are the same when there
is nothing drawn in the gutter like line numbers etc).
This tests just a few basic things for now. Mainly, that we don't
emit redundant notifications for enum, flags, int and boolean
properties. It also checks that we do emit the expected notifications
when the value actually changes. This is checked for string, double
and float properties as well.
There is a large number of exceptions in the test, and a lot more
checks that could be done. One class of exceptions is all the places
where we have -set booleans to go along with another property. We
should have a dedicated test for these pairs. Another class of
exceptions is where naked objects created by g_object_new () just
don't have the full functionality - e.g. a tree selection without
a tree view does not work very well. We set up the instance object
better for these situations.
The reftest is testing "transparent" works as expected by drawing a
purple background once with purple and once with transparent and
expecting the same result. This works fine unless anti-aliasing happens
at rounded corners. The overdraw of the 2nd background changes the
antialiased pixels.
Fix this by explicitly setting the border radius to 0.
Also reindent the file to make it more readable.
This tests both a sequence being claimed early to be then denied
(and handled deeper in propagation chain), and a sequence being
claimed late in the capture phase (and thus being cancelled deeper
in the propagation chain)
Before this change, a sequence being claimed deep in the event propagation
chain would make the sequence go denied on every ancestor, regardless of
previous state.
To make things more consistent, only deny the sequence if it was previously
claimed, so the behavior is the same for gesture groups within the widget
than for those outside the widget.
The gestures testsuite has been updated to reflect this new behavior.
It might happen that a gesture claims a sequence before any other gesture
in its group even handled a single event from that sequence. In that case,
ensure the state is set accordingly right when the sequence is handled in
those.
The "group" gesture testcase has been updated to observe this behavior.
This test check that resizing the window when expanding
the expander yields the same end result as having the
expander expanded to begin with. The test uses the inhibit
mechanism introduced in the previous commit.
This adds an inhibit api that code from the reftest module
can use to delay the taking of the snapshot. Also refactor
the code in gtk-reftest to use the inhibit mechanism for
its own delaying of the snapshot until after the first
expose.
This reftest makes use of the new feature to add signal handlers.
It adds a libreftest.so module containing all the code for the reftests.
When adding a test named reftest.ui, please keep code contained in a
source file names reftest.c and add that file to Makefile.am.
https://bugzilla.gnome.org/show_bug.cgi?id=730833
When connecting signal names, gtk-reftest now allows you to use a colon
in the signal handler name like so:
module:function_name
where module is a module loaded from the same directory (or the .libs
subdirectory for compatibility with uninstalled libtool) as the running
test and the function is resolved in that module. Of course, normal
function names work as before.
This test just checks that all the icon names that GTK uses are present
in the default icon theme.
As icon names are not checked programmatically and we do not want to run
into missing-icon icons in the code, this test seems necessary.
For now, it's just a stub that tests stock icons.
To make the icontheme test run successfully when installed,
we need to use the correct test-framework-provided location,
and we need to install the test theme without stripping its
subdirectory structure.
This test is a bit brittle because it doesn't properly rely on CSS
properties but needs to use widget style properties to turn of extra
sizing from widgets.
It might break in the future when porting widgets to draw properly.
Quoting the spec:
If the cascaded value of a property is the unset keyword,
then if it is an inherited property, this is treated as
inherit, and if it is not, this is treated as initial.
Spec in question:
http://dev.w3.org/csswg/css-cascade/
Also use unset in the reset-to-defaults.css we use to reset css in
reftests.
Added GTK_BUILDER_ERROR_INVALID_PROPERTY and GTK_BUILDER_ERROR_INVALID_SIGNAL
error codes
ObjectInfo: Use a GType instead of a char * for the class name.
PropertyInfo: Use a GParamSpec instead of a char * for the property name.
SignalInfo: Use signal id and detail quark instead of a detailed signal name string.
This not only save us a few malloc in each case but lets us simplify the code
and report unknown properties and signals as a parsing error instead of just
printing a warning.
Binding an object sensitive property with a check button active property will look like this:
<object class="GtkButton" id="button">
<property name="sensitive" bind-source="checkbutton" bind-property="active"/>
</object>
This is based on the original work done by Denis Washington for his GSoC project
This closes Bug 654417 "[GSoC] Add <binding> element to GtkBuilder syntax"
- As the tests show, some of the functions have a strange and
inconsistent behavior for corner cases.
- Rename test_full_buffer() -> test_search_full_buffer() because
textiter.c is used for other GtkTextIter unit tests.
https://bugzilla.gnome.org/show_bug.cgi?id=727908
In the unlikely case that there is another GPL released in the future
it would be best if we link directly to the 3.0 version of the
license description instead of the alias to the latest
version.
It seems that alternate implementations of GtkFileChooserWidget
never materialized. The split between GtkFileChooserWidget and
GtkFileChooserDefault is awkward. The immediate problem is that
it makes it difficult to document the keybinding signals. So it
makes sense to drop the abstraction and just have one thing.
https://bugzilla.gnome.org/show_bug.cgi?id=723157
The color chooser test is constantly running into the
problem that the custom color setting is not empty.
Avoid that by using the memory settings backend.
It would be nicer if we could have the tests specify what environment
their expected output was created in, then we could test multiple
scenarios. For now, just fix the setting to avoid test failures.
Stop trying to deal with "theoretical possibilities".
We can't possibly continue to be a faithful GActionGroup implementation
across dispose because dispose has a side effect of removing everyone's
signal handlers.
The code that we ran after the dispose chainup to do all of the fancy
signal emulation was therefore dead. The test that aimed to verify this
was buggy itself due to an uninitialised variable, so really, it never
worked at all.
We keep the re-ordering of the chainup from the original commit to avoid having
trouble with GtkActionMuxer and keep the checks in place that will prevent an
outright segfault in the case that someone else tries to use the interface
post-dispose.
https://bugzilla.gnome.org/show_bug.cgi?id=722189
The signal callbacks are defined to take pointers as their arguments, but the
callbacks found in testsuite/gtk/builder.c are passing a GParamSpec by value
as the second argument. This confuses and angers the compiler on ppc64el,
resulting in segfaults after return from the function due to stack-smashing
by the (completely-unused) argument.
https://bugzilla.gnome.org/show_bug.cgi?id=721700
Improve the color swatch accessible to set a proper role
depending on whether the swatch is selectable or not, and
set the checked atk state when appropriate.
https://bugzilla.gnome.org/show_bug.cgi?id=721048
And update the colorchooser a11y test to a) use GtkColorChooser
instead of the deprecated GtkColorSelection and b) match this
change. Pointed out in
https://bugzilla.gnome.org/show_bug.cgi?id=721045
This commit makes the label accessible implement AtkHypertext,
which returns a AtkHyperlink object for each link in the text.
At the same time, add AtkHyperlinkImpl objects as children
to the label accessible.
Also some private API to indicate that links have changed, and
call that from GtkLabel when needed.
Adjust expected output of the affected a11y tests.
https://bugzilla.gnome.org/show_bug.cgi?id=721410https://bugzilla.gnome.org/show_bug.cgi?id=721421
The button now claims its menu as a child for a11y purposes,
which makes it possible for ATs to see it when the navigate
the tree top-down.
Update the a11y test to match.
Make sure that the tests don't access the host's session bus or
installed gsettings schemas.
Also disable tests for some classes that leak a connection to the
session bus.
https://bugzilla.gnome.org/show_bug.cgi?id=711715
Ignore the "show-desktop" property on GtkPlacesSidebar for the
defaultvalue test.
Currently, "make check" is passing because it runs the test under a xvfb
with no XSETTINGS provider, so we see the Gtk default value. No matter
what we set the default value to in Gtk, however, there will be some
desktop environment in which someone running the installed test outside
of an xvfb will get the wrong result. Best to ignore it.
https://bugzilla.gnome.org/show_bug.cgi?id=712302
When downscaling images, Cairo apparently uses algorithms different
enough to make this test trip over. So add the downscaled image as the
reference instead of downscaling the previous reference image.
Fixes the border-image reftest. For real now.
The new downscaling code in Cairo doesn't allow this test, so we remove
the CSS that made the border downscaled.
So the test does test less now, but it still tests the repeat modes of
border images.
One requirement of .ui files is that each object must have an ID,
even if it is never referred to or directly loaded from the code.
This makes editing .ui files much more onerous than it has to be,
due to the frequent need to invent new IDs, while avoiding
clashes.
This commit makes IDs optional in the XML. They only need to
be provided for objects which are referred to or explictly loaded
from the code. Since GtkBuilder needs IDs for its own internal
accounting, we create IDs of the form ___object_N___ if not
specified in the XML.
https://bugzilla.gnome.org/show_bug.cgi?id=712553
So far, this is just supposed to be gdk_cairo_set_source_pixbuf().
Note that this is usually not an API guarantee but courtesy to
applications that used these APIs without a gtk_init() call.
https://bugzilla.gnome.org/show_bug.cgi?id=708547
The headerbar test and the buttons tests changed because we've
recently changed accessible names, descriptions and roles of
GtkHeaderBar and GtkSwitch.
This reverts commit 7cecc8e524.
It is impossible to use the selection object of the menu while it is
collapsed (collapsed menus deselect everything for a start), so even
though the original patch was correct, the followup issues are too big
to solve this quickly to a release.
https://bugzilla.gnome.org/show_bug.cgi?id=707786
It tests gtk_text_buffer_paste_clipboard(),
gtk_text_buffer_copy_clipboard() and gtk_text_buffer_cut_clipboard() in
various situations, including when GtkTextTags are applied to the
selection.
The last test didn't pass.
https://bugzilla.gnome.org/show_bug.cgi?id=339539
nth-child() is 1-indexed, not 0-indexed.
It doesn't matter for this test really, but better do it right to not confuse
poor developers who wonder why the first image is highlighted when nth-child(0)
clearly states "none".
The reftest is a bit flaky because it compares cell renderers with
GtkImage and therefor an icon view with a GtkBox, but it's the best I
can come up with.
https://bugzilla.gnome.org/show_bug.cgi?id=702423
The fix for child properties made the a11y dump for the assistant
case change. After close inspection, the new output is what the
code intends to produce, so update the expected result.
This value is highly sensitive to changes in the theme; we
don't want to have to tweak hardcoded integers in this test case
every time we rev gnome-themes-standard.
Future iterations could do more heuristic matching, but this
is enough for now.
https://bugzilla.gnome.org/show_bug.cgi?id=704747
When the search is case sensitive, g_utf8_normalize() is not called, so
the skip_decomp argument of the function forward_chars_with_skipping()
must be FALSE.
To verify that, when searching "éb", the count parameter of
forward_chars_with_skipping() have a different value:
- case sensitive: count = 2
- case insensitive: count = 3 (g_utf8_normalize() has been called)
The commit adds unit tests that didn't pass before, and that now pass
(without known regression, obviously).
https://bugzilla.gnome.org/show_bug.cgi?id=702977
The function must return TRUE only if there is a tag toggle _after_ the
iter, not _at_ the iter. So for the end iter, the function must always
return FALSE.
Add also unit tests for gtk_text_iter_forward_to_tag_toggle().
https://bugzilla.gnome.org/show_bug.cgi?id=691266