Commit Graph

334 Commits

Author SHA1 Message Date
Benjamin Otte
9d0ec409ff reftest: Build a shared lib on win32
Windows needs a shared library to link the modules against, otherwise
the undefined symbols make it not work.

So build a shared library on Windows.

We don't want a library elsewhere, as that just complicates things, so
we only make the library shared on Windows and keep it as a noinst
library otherwise.

https://bugzilla.gnome.org/show_bug.cgi?id=736338
2014-09-22 15:47:02 +02:00
Rico Tzschichholz
aa08b87ab6 reftest: Add missing include of reftest-snapshot.h 2014-09-22 15:19:51 +02:00
Matthias Clasen
7ead9d45de check-icon-names: Check for legacy names again
Keep checking the legacy icon names as long as we support them
(this caught gtk-undelete not working quite as expected).
2014-09-21 23:14:56 -04:00
Matthias Clasen
b5a3900588 check-icon-theme: Print the name of the icon-theme 2014-09-21 16:34:33 -04:00
Matthias Clasen
df8a688656 icon-theme: Test inheritance vs. generic fallback
Add a few tests that check the behavior of icon theme inheritance
vs generic fallback vs symbolic icons.
2014-09-21 16:34:27 -04:00
Benjamin Otte
ee9e708cf6 reftest: Build a private library for gtk-reftest
This is a noinst library for now, but the idea is to turn it into a
proper DLL on Windows, so that we can install it and properly link the
modules to it. Windows doesn't allow undefined symbols in modules.

https://bugzilla.gnome.org/show_bug.cgi?id=736338
2014-09-21 18:59:12 +02:00
Benjamin Otte
2e6dd4082f reftest: Split our more functionality
Split actually taking the snapshot into its own file.
2014-09-21 18:58:45 +02:00
Benjamin Otte
0182d1ed38 reftest: Split out some functionality into own file
Comparing two surfaces is something that can be nicely factored out.
2014-09-21 18:58:45 +02:00
Benjamin Otte
9a8a4a8b14 widget: Don't assume opacity is 100%
... just because there is no style context instantiated yet. Instead,
instantiate a style context during realize() and ask it.

Fixes problems with dim labels not being dimmed on first show.

Testcase included.

https://bugzilla.gnome.org/show_bug.cgi?id=735240
2014-09-07 01:57:10 +02:00
Benjamin Otte
95959ef470 overlay: Handle overlays when no main widget exists
Just pretend that the main widget is an empty widget the size of the
overlay.
Makes it possible to write testcases where no size requests are run on
overlay widgets before size_allocate() is called.

Testcase included.
2014-09-07 01:57:09 +02:00
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