Commit Graph

324 Commits

Author SHA1 Message Date
Matthias Clasen
10703a0275 notification tests: Skip GtkEntryCompletion::text-column
This one is special.
2014-09-03 22:46:38 -04:00
Matthias Clasen
6fbb1c782b Add a testcase for counting selection in treeviews
https://bugzilla.gnome.org/show_bug.cgi?id=702957
2014-08-30 01:46:58 -04:00
Matthias Clasen
c71d1b9664 treeview tests: Clean up after each test
It is not good form to leak in testcases.
2014-08-30 01:46:26 -04:00
Matthias Clasen
00866d1c0a treeview tests: Add bug references 2014-08-30 01:34:10 -04:00
Matthias Clasen
e014b89310 Move gtkthemingengine to deprecated directory
This is the place for wholly-deprecated sources.
2014-08-29 16:35:37 -04:00
Emmanuele Bassi
5ad60caa3c css: Implement font-stretch
The font-stretch CSS property is defined in the Level 3 CSS Fonts
module, available at:

  http://dev.w3.org/csswg/css-fonts/#propdef-font-stretch

It allows defining a normal, condensed, or expanded face to the font
description. Pango already supports it, so this is literally just the
CSS parser machinery needed to bridge our CSS to the FontDescription
API.

https://bugzilla.gnome.org/show_bug.cgi?id=735593
2014-08-28 13:41:40 +01:00
Benjamin Otte
21d3701291 reftests: Fix Makefile
with non-installed tests the build would get an empty $(reftestdir)
which would screw up the LDFLAGS.

An rpath seems to be required to make libtool build a shared object.
Without an rpath line, it only builds a static object.

https://bugzilla.gnome.org/show_bug.cgi?id=735401
2014-08-27 18:02:52 +02:00
Benjamin Otte
0f0fc59fbd build: make reftests work without installed tests
The libreftest.so module needs to be built in all cases.
Without installed tests, it needs to not be installed though.

https://bugzilla.gnome.org/show_bug.cgi?id=735401
2014-08-26 20:05:49 -04:00
Matthias Clasen
bcb9eabf11 Add tests for parsing int64/uin64 in GtkBuilder
This tests the fix in the previous commit.
2014-08-21 14:22:13 -04:00
Sébastien Wilmet
706c8e9c8d Simplify _gtk_text_buffer_get_line_log_attrs()
NULL was returned in case of an empty last line. Every users needed to
special-case this. Now it will return the expected result: char_len of 0
with one PangoLogAttr.

In compute_log_attrs(), 'paragraph' will be the empty string "" with
'char_len' == 0.
pango_get_log_attrs() works fine with an empty string, it will return
one correct PangoLogAttr (because there is one text position for the
empty string).

It fixes the unit tests for gtk_text_iter_is_cursor_position().

https://bugzilla.gnome.org/show_bug.cgi?id=156164
2014-08-21 18:43:34 +02:00
Sébastien Wilmet
83bc0c4bb1 textbuffer: unit tests for the empty last line
For functions using _gtk_text_buffer_get_line_log_attrs():
- gtk_text_buffer_backspace()
- some gtk_text_iter functions (word/sentence/cursor boundaries)

As the FIXME comments show, there is a bug with
gtk_text_iter_is_cursor_position() for an empty last line.

https://bugzilla.gnome.org/show_bug.cgi?id=156164
2014-08-21 18:43:34 +02:00
Benjamin Otte
2737c67cce css: Round shadow extents properly
Otherwise drawing will be clipped.

Testcase included
2014-08-21 00:54:07 +02:00
Benjamin Otte
67456304d4 roundedbox: Only grow border-radius if there is one
This is relevant for shadow spread and goes in line with the web.

Testcase included.
2014-08-21 00:54:07 +02:00
Benjamin Otte
1126a34353 label: Respect box-shadow when computing clip
Testclase included.

Also reorder headers to be alphabetic.
2014-08-21 00:54:07 +02:00
Sébastien Wilmet
7bc819e88d tests textbuffer: don't use GdkColor (deprecated) 2014-08-20 17:19:30 +02:00
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