Commit Graph

359 Commits

Author SHA1 Message Date
Benjamin Otte
b1ac4f91d3 reftests: Update for :active => :checked change 2014-08-16 20:41:32 +02:00
Matthias Clasen
aefe86d632 Update expected output for the font picker a11y test
This change is a consequence of the recent font chooser changes.
2014-08-16 13:02:47 -04:00
Matthias Clasen
d3dc05174e Update expected output in a11y tests for buttons
This is an expected change from the recent button state cleanups.
2014-08-16 13:01:50 -04:00
Benjamin Otte
36a2e7ca8e css: Add a :checked pseudoclass
https://bugzilla.gnome.org/show_bug.cgi?id=733967
2014-08-16 16:34:14 +02:00
Matthias Clasen
269d277afe Adapt to spinbutton changes 2014-08-14 19:39:07 -04:00
Benjamin Otte
9d2c3f5e68 reftests: Add reftest for statusbar fix
https://bugzilla.gnome.org/show_bug.cgi?id=724281
2014-08-14 19:52:59 +02:00
Benjamin Otte
2120ccfd5e reftests: Make gcc happy 2014-08-14 19:52:59 +02:00
Matthias Clasen
ec2bc3face Add some spinbutton tests
These tests check some of the changes from the previous commits.
2014-08-14 00:04:10 -04:00
Руслан Ижбулатов
694c8d32d5 Fix various warnings about unused things
https://bugzilla.gnome.org/show_bug.cgi?id=734735
2014-08-13 23:38:47 +00:00
Benjamin Otte
dff52f7a04 css: Match state in siblings properly
Previously, we always returned the state flags of the original widget
and did not consider the siblings' pseudoclasses.

Testcase is attached.
2014-08-13 16:51:16 +02:00
Alexander Larsson
f3b56261cb Fix symbolic-icon-translucent-color reftest
When using the pre-rendered png symbolics it seems that we're off a
tiny bit in a few of the pixels on the antialiased borders of a
stroke. To fix this we switch the icon to media-playback-stop-symbolic
which has no such antialiased borders.

I don't quite understand why the pixels are off, this needs more
research.

https://bugzilla.gnome.org/show_bug.cgi?id=734668
2014-08-12 15:51:36 +02:00
Matthias Clasen
80a8257302 Fix reftests for builddir != srcdir
Make gtk-reftest consult the REFTEST_MODULE_DIR environment
variable to find out where to look for modules, and fix the
libtool hack to construct the .libs subdirectory correctly.
2014-08-10 19:11:39 -04:00
Matthias Clasen
1185b9b29c Fix animation-direction reftest
This was another victim of clipping changes - the labels were
overdrawing each other, leading to test failure. Prevent this
by separating the grid columns.
2014-08-10 19:11:38 -04:00
Matthias Clasen
2d15c25d93 reftests: Make textview-margins pass in make check
I found that setting margins to zero makes the textview clip
away some overshooting pixels. So, instead of a 0/10 split,
do this test with a 2/8 split of margins, to avoid the clipping
issue.
2014-08-10 07:41:53 -04:00
Matthias Clasen
0b669dffa9 Skip focus tests in make check
These require a window manager to work, and we currently don't
run one when we run make check tests under Xvfb.
2014-08-10 07:08:39 -04:00
Matthias Clasen
b7365c52c4 Make focus tests session-exclusive
Otherwise, tests running in parallel will steal the focus that
we are trying to test.
2014-08-08 22:15:02 +02:00
Matthias Clasen
944e30d940 Add a11y state tests
This adds a new test which can be scripted to trigger various
event and action sequences, and record state changes in the
accessibility layer.

So far, there are a few tests verifying state changes when
focus changes.

Related to https://bugzilla.gnome.org/show_bug.cgi?id=715176
2014-08-04 09:58:58 +02:00
Matthias Clasen
52ab9a36fa Add a test for window focus handling
This is a small test that checks that gtk_window_set/get_focus
behave as expected, regardless of the window being shown or hidden.
2014-08-02 11:38:44 +02:00
Benjamin Otte
a3d1db608b label: Don't clip text shadows
The previous code for computing the clip rectangle forgot to respect
the text-shadow CSS property. This is usually not very visible because
text shadows usually don't extend the ink rectangle by very much.

See attached testcase for an example.
2014-07-31 17:50:24 +02:00
Benjamin Otte
d6e9997619 css: Fail animation shorthand parsing properly
When a number is not a nubmer, don't just crash, exit properly with an
error code.

See attached testcase for an example.
2014-07-31 10:03:19 +02:00
Benjamin Otte
5f5d3a9d82 css: Don't infloop when parsing broken borders
There was an infinite loop when parsing invalid text after having parsed
a color in the border shorthand. See attached testcase for an example.
2014-07-31 10:03:18 +02:00
Matthias Clasen
a6b8800531 Add a test for popover accessible parents
This tests the fix in the previous commit.
2014-07-30 23:14:49 +02:00
Benjamin Otte
386e59683a reftest: Add reftest for CSS sizing fix
The test uses a GtkBox for rendering the background, but it could use
any other widget that is not used in the reference.
2014-07-23 18:51:26 +02:00
Matthias Clasen
52ec7bf54e Add a test for matching with states 2014-07-22 18:50:31 -04:00
Matthias Clasen
c3bfaaa5d1 Add some tests for GtkAdjustment 2014-07-22 18:32:17 -04:00
Matthias Clasen
c10ddf8ec8 Install a missing file
This was causing the css parser tests to fail in continuous.
2014-07-21 22:05:15 -04:00
Benjamin Otte
d66db441e3 reftests: Add a reftest for recent widget path fix
The widget path code copies elements only in gtk_widget_path_copy() -
which is essentially unused - and in
gtk_widget_path_append_with_siblings() - which is used by GtkBox.

So stuff the widget we are testing in a GtkBox to reroduce the problem.
2014-07-22 03:06:04 +02:00
Matthias Clasen
452f92c644 Update expected output for a11y tests 2014-07-21 19:21:02 -04:00
Benjamin Otte
3661756070 testsuite: Add test for pseudoclasses
They should all be printable.
2014-07-21 19:54:14 +02:00
Benjamin Otte
bed70f2bcf reftests: Add reftest for new pseudoclass support 2014-07-21 01:03:47 +02:00
Sébastien Wilmet
dc1317a521 textiter: fix bug in find_visible_by_log_attrs()
find_by_log_attrs() can return true only in this case:
return moved && !gtk_text_iter_is_end (arg_iter);

So if the iter moved (i.e. something has been found), but is the end
iter, find_by_log_attrs() returns false.

Now the same checks are made in find_visible_by_log_attrs(). The public
functions using find_visible_by_log_attrs() say in their documentation
that false is returned for the end iter, hence the check with
gtk_text_iter_is_end().

https://bugzilla.gnome.org/show_bug.cgi?id=618852
2014-07-17 12:56:57 +02:00
Sébastien Wilmet
69d20f53e2 textiter: fix bug in FindLogAttrFunc functions
attrs[len] is the last PangoLogAttr available, at the iter position after the
last character of the line.

For a line in the middle or the start of the buffer, the '\n' is taken
into account by 'len'. For example the is_word_end is generally reached
before the '\n', not after. But for the last line in the buffer, where
there is no trailing '\n', it is important to test until attrs[len].

The bug didn't occur before because find_by_log_attrs() worked directly
on the iter passed as the function argument. But now it is no longer the
case.

https://bugzilla.gnome.org/show_bug.cgi?id=618852
2014-07-17 12:56:56 +02:00
Sébastien Wilmet
5d66634482 textiter: fix bug in find_by_log_attrs()
Do not work with the iter passed as the function argument. Work with
another iter, and set it back to the function argument only if something
has been found.

This fixes a few unit tests. But there are regressions for a few others.

https://bugzilla.gnome.org/show_bug.cgi?id=618852
2014-07-17 12:56:56 +02:00
Sébastien Wilmet
79c835a151 tests textiter: unit tests for sentence boundaries
As the FIXME comment shows, there is a bug. It is the same bug as for
the word boundaries.

https://bugzilla.gnome.org/show_bug.cgi?id=618852
2014-07-17 12:56:56 +02:00
Sébastien Wilmet
96de203ee0 tests textiter: unit tests for visible word boundaries
As the FIXME comments show, there are several problems.

https://bugzilla.gnome.org/show_bug.cgi?id=618852
2014-07-17 12:56:56 +02:00
Matthias Clasen
085fada849 Force the simple im module for reftests
I've seen reftests fail with IBus warnings. We should avoid that.
2014-07-14 18:22:40 -04:00
Matthias Clasen
69b25a77aa Update expected output for a11y test 2014-07-14 14:36:58 -04:00
Sébastien Wilmet
923642454f tests textiter: unit tests for cursor positions
See the FIXME comment.

https://bugzilla.gnome.org/show_bug.cgi?id=618852
2014-07-13 17:09:40 +02:00
Benjamin Otte
9ae0b8ed27 reftests: Add test for latest fix
Ensure we draw the full backgorund on labels, not just where test
appears.
2014-07-12 07:13:28 +02:00
Benjamin Otte
e1112dce6d reftests: Add test for the recent label changes 2014-07-10 18:56:35 +02:00
Benjamin Otte
6a2ae1bb90 reftests: Improve workaround for GtkGrid bug
... so that it works with wide separators. Or rather: with separators
that don't request 1px size but any other number. Do that by making the
placeholder request the same size by indeed stuffing (hidden) separators
in it.
2014-07-10 18:56:34 +02:00
Matthias Clasen
86cceab75d builder test: Adjust expections
Dialogs no longer set a headerbar as titlebar unless use-header-bar
is set to 1. Update the test to do that.
2014-07-09 19:54:43 -04:00
Matthias Clasen
5436438520 a11y: Update expected output for color chooser 2014-07-09 19:48:08 -04:00
Matthias Clasen
0abb2f57fd Update more places for the changed icon name 2014-07-09 08:03:57 -04:00
Matthias Clasen
73bc9b59dd Add view-context-menu-symbolic to checked icon names 2014-07-08 09:30:16 -04:00
Benjamin Otte
a1bae4b389 reftests: Add a reftest for 'animation-direction'
It tests the latest two commits.
2014-07-07 20:06:47 +02:00
Benjamin Otte
0b2198a26b testsuite: Add parser test for recent fix
The test doesn't crash without the fix, but it parses the CSS
incorrectly and fails.
2014-07-07 14:26:06 +02:00
Matthias Clasen
689a364ec5 Drop has-resize-grip from the notify test
The setter is not doing anything, so we won't get notification.
2014-07-03 15:24:58 -04:00
Matthias Clasen
6feab4f257 disable runtime warnings in the defaultvalue test
This test operates generically on all properties, so warning
about deprecated properties does not make sense here.
2014-07-03 15:22:39 -04:00
Jasper St. Pierre
ece9ae4bc5 gtkwindow: Remove resize grips
Resize grips were introduced for GNOME 3.0, before we had any of the
"new GNOME app" features like invisible borders and CSD. With OS X 10.6
and 10.7, Apple has replaced the classic grips in their applications
with invisible borders as well.

New GNOME app designs don't use resize grips anymore and the new
default theme for GTK+, Adwaita, disables them entirely by forcing their
width and height to 0.

They're past their time. Remove the code to support them. This can
always be reverted if some app relies on them.
2014-07-03 12:58:41 -04:00
Matthias Clasen
d8934ea233 testsuite: Adapt to changed builtin icon paths 2014-07-02 17:17:48 -04:00
Matthias Clasen
3da76c1e14 Disable deprecation warnings for installed reftests
Otherwise, these fail in continuous.
2014-06-28 11:13:17 -04:00
Matthias Clasen
6119f66401 notification test: Always disable runtime deprecation warnings
These are just not useful in a test that generically deals with
all properties.
2014-06-28 10:59:41 -04:00
Matthias Clasen
f1c1192e71 Exclude GtkToggleButton::draw-indicator from the notification test
We reverted to emitting redundant notifications for this, so
don't assert that we don't.
2014-06-28 10:58:24 -04:00
Matthias Clasen
c4e533ecd6 Fight deprecation warnings in test
This time, in installed tests.
2014-06-28 00:41:26 -04:00
Matthias Clasen
b9bd7159c0 Disable deprecation warnings in tests
We want to test deprecated properties, so failing the tests with
warnings is not productive.
2014-06-25 16:29:08 -04:00
Matthias Clasen
86d2315b27 icon-theme: Add another lookup order test
This tests rtl lookup order for non-symbolic icons.
2014-06-25 13:53:30 -04:00
Richard Hughes
12e389dd3c Makefile: Actually dist the high-contrast and dark test files 2014-06-24 21:18:46 +01:00
Matthias Clasen
7119037743 Add a test for async icon loading 2014-06-23 21:25:21 -04:00
Matthias Clasen
f00a1f9aae notify test: Skip GtkWidget::double-buffered
This property is now deprecated, and ignored, thus: no notification.
2014-06-22 12:09:52 -04:00
Matthias Clasen
769fc52055 Adapt icontheme tests
With our new, improved icon theme spec compliance, some of the
tests need updates to their expected outcomes.
2014-06-22 11:52:11 -04:00
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