Commit Graph

248 Commits

Author SHA1 Message Date
Benjamin Otte
93b3179042 widgetpath: Deprecate regions
This is a foolowup to d80bf0790d
2014-06-21 15:46:44 +02:00
Matthias Clasen
99c0b3db06 Adapt the icontheme tests
With the new way of dealing with the legacy stock icons,
the builtin test needed some small updates.
2014-06-20 01:17:46 -04:00
Matthias Clasen
a8939e7cff icontheme: Add some more tests
This test checks that gtk_icon_theme_list_icons and
gtk_icon_theme_has_icon work as expected.
2014-06-20 01:17:45 -04:00
Matthias Clasen
640f9d110e Install the new icontheme test files 2014-06-19 13:52:10 -04:00
Matthias Clasen
a6f1f8dacf Add more icon theme tests
This test checks various directory size behaviours, with and
without the FORCE_SIZE flag.
2014-06-18 19:09:25 -04:00
Matthias Clasen
8253b76bf6 Add a test for builtin icons
We want to get rid of these, but as long as we still have them,
make sure they work.
2014-06-17 14:38:18 -04:00
Benjamin Otte
aeac92a497 testsuite: Add test for latest commit 2014-06-17 00:01:25 +02:00
Jasper St. Pierre
38a6a72a7f Makefile: Add a few more cleanfile / ignore rules 2014-06-16 14:03:53 -04:00
Benjamin Otte
0e64019df3 testsuite: Remove a test
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.
2014-06-16 18:43:50 +02:00
Paolo Borelli
715b8744f5 TextView: render the background of border windows
Set the .top, .left, etc css classes and render the background
of the border windows.
Change the reftest implementation accordingly.
2014-06-15 18:57:06 +02:00
Paolo Borelli
2eeff1eed6 Add a TextView reftests checking border-windows
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.
2014-06-15 18:56:30 +02:00
Paolo Borelli
2c5be3b231 TextView margin reftest
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).
2014-06-15 18:15:43 +02:00
Paolo Borelli
570653354a Dist recently added reftests 2014-06-15 12:05:40 +02:00
Kalev Lember
71ac15ec2f Fix another typo 2014-06-15 11:24:39 +02:00
Matthias Clasen
d58a3439e4 Fix a typo 2014-06-15 04:15:32 -04:00
Matthias Clasen
0cb7031d1d Install all icons for installed tests
Otherwise the icontheme test fails in continuous.
2014-06-14 22:52:57 -04:00
Paolo Borelli
c184458ab3 notebook: set tab position style class on the main frame
We want to have .top etc also on the notebook frame, not only on
the header frame.
The patch includes a reftest by Benjamin.
2014-06-14 21:37:07 +02:00
Matthias Clasen
84cf748eae Add more icontheme tests
This test is focused on svgs, and how we scale them when
loading.
2014-06-14 15:10:49 -04:00
Benjamin Otte
45a64cd7d4 testsuite: Add a test for symbolic icons in specific sizes
Check that loading symbolics works, even if the symbolic is only
available in a fixed size.
2014-06-12 12:34:09 +02:00
Benjamin Otte
6affe29c9a testsuite: Add missing errors file
The file was forgotten in 98954bd1d1 and
caused test failure. Oops.
2014-06-11 01:18:04 +02:00
Benjamin Otte
98954bd1d1 testsuite: Add a test for recent fix 2014-06-10 01:07:57 +02:00
Matthias Clasen
f870a50f1f Add a test for property notification
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.
2014-06-09 13:31:14 -04:00
Benjamin Otte
bb3174c913 reftests: Fix random failures of reftest
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.
2014-06-09 19:18:48 +02:00
Carlos Garnacho
524e28a13c tests: Add multitouch gesture tests
So far, gesture behavior on lack/excess of touchpoints is tested, as well
as sequence hand-in between gestures in these situations.
2014-06-04 13:54:41 +02:00
Matthias Clasen
d467850af0 Shorten test paths 2014-06-03 14:22:55 -04:00
Matthias Clasen
c11b7e44a0 label-sizing reftest: Hardcode ltr
This reftest doesn't work in rtl.
2014-06-03 12:28:06 -04:00
Matthias Clasen
ac59f0ac08 reftests: Add a way to hardcode text direction
Some tests don't work in rtl, so add a way to hardcode
the expected text direction. This is in preparation for
running reftests in an rtl locale.
2014-06-03 12:28:06 -04:00
Carlos Garnacho
94f573d8a4 tests: Add tests for grab interaction with gestures
The behavior of gestures that are kept outside/inside a grab is tested,
to ensure the former are cancelled and the latter remain unchanged.
2014-06-03 16:13:25 +02:00
Carlos Garnacho
93f72985bf tests: Add gesture tests for early/late sequence claiming
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)
2014-06-03 16:13:25 +02:00
Carlos Garnacho
fd1a566d46 tests: Inform of gesture updates during recognition
May be useful to find out which gestures are still being triggered
by a sequence.
2014-06-03 16:13:25 +02:00
Carlos Garnacho
fe7215e369 testsuite: Prepare gestures testsuite for mouse/touch events
state is preserved for mouse emulation, and up to 10 touchpoints for touch
emulation.
2014-06-03 15:59:03 +02:00
Carlos Garnacho
26ced6abad widget: Only deny a sequence if it was previously claimed
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.
2014-06-03 15:59:03 +02:00
Carlos Garnacho
c773859c99 gesture: Ensure late gestures handling the sequence get the group state
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.
2014-06-03 15:59:03 +02:00
Benjamin Otte
45dbd84ff3 reftests: Use "all" property in inherit-and-inital test 2014-06-03 14:35:00 +02:00
Matthias Clasen
42945f0d74 Run reftests repeatedly
Install test files that run the reftests in the
Adwaita:dark and HighConstrast themes. It works,
so why not.
2014-06-02 22:46:23 -04:00
Matthias Clasen
7f8d0552f0 Drop debug spew from installed tests
This is no longer needed, we found the problem.
2014-06-02 22:37:29 -04:00
Matthias Clasen
5bebbb06fa Add an expander reftest
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.
2014-06-02 22:36:01 -04:00
Matthias Clasen
b86f5a4086 Add a way to delay snapshots in reftests
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.
2014-06-02 22:35:59 -04:00
Matthias Clasen
16c89eb5f7 Forgotten file 2014-06-02 21:43:04 -04:00
Matthias Clasen
94c065d647 Add a reftest for flipping icons
Taking advantage of our new direction flipping ability.
2014-06-02 21:41:32 -04:00
Matthias Clasen
97930a774b Add more gestures tests
Some of these sequences look wrong/questionable to me.
2014-05-31 18:46:43 -04:00
Matthias Clasen
bdf81a7c70 gestures test: make more readable 2014-05-31 12:54:36 -04:00
Matthias Clasen
4298e88f48 gestures: Add a test for grouping
I'm not entirely convinced the test produces the expected
outcome, here.
2014-05-31 12:48:14 -04:00
Matthias Clasen
1c24b288b0 Expand gesture tests a big more
Print out sequence state changes, and cancellation, and verify that
claiming a gestures causes the expected state changes.
2014-05-31 12:26:15 -04:00
Benjamin Otte
86267fd9bd gtk-reftest: Add GMODULE_CFLAGS/LIBS
They aren't included in GTK_DEP_CFLAGS/LIBS so they need to be added
manually.
2014-05-31 14:40:13 +02:00
Matthias Clasen
98cf67ddba testsuite: put installed tests in the right place
Follow the prevailing practice and put the installed tests
into $libdir/installed-tests/$PACKAGE instead of
$pkglibdir/installed-tests.
2014-05-31 00:16:07 -04:00
Matthias Clasen
5880c9e365 gtk-reftest: Don't warn needlessly
Only warn about the --direction argument if the option was
actually specified.
2014-05-30 23:30:56 -04:00
Benjamin Otte
a18ec83b3b reftests: Add reftest for direction change
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
2014-05-31 05:19:41 +02:00
Benjamin Otte
690fb31fb4 gtk-reftest: Clarify --direction argument parameters
... and print a proper error message when the parameter is not
recognized.
2014-05-31 05:19:41 +02:00
Benjamin Otte
8bba9b6a4a gtk-reftest: Allow loading code for reftests
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.
2014-05-31 05:19:41 +02:00