Commit Graph

390 Commits

Author SHA1 Message Date
Matthias Clasen
f06cd304bd Adjust tests 2015-04-30 06:19:10 -04:00
Matthias Clasen
5271106250 Test the new error conditions 2015-04-29 15:20:51 -04:00
Matthias Clasen
90352f1979 GtkInfoBar: Add a test for 'invalid ID' 2015-04-27 23:09:35 -04:00
Matthias Clasen
cd19f3bf0b GtkDialog: Add a test for 'invalid ID' 2015-04-27 23:09:35 -04:00
Matthias Clasen
86ca248c99 GtkContainer: Add a test for 'invalid ID'
...and add all the container tests to Makefile.am
2015-04-27 23:09:30 -04:00
Matthias Clasen
7969204e7a Adjust affected tests 2015-04-27 19:21:45 -04:00
Matthias Clasen
a84c15fef0 Fix the build
There was one too many dialog test cases in the Makefile.

https://bugzilla.gnome.org/show_bug.cgi?id=748509
2015-04-27 06:15:28 -04:00
Matthias Clasen
3c23a2e32b Adjust builder tests
Some errors are now returned as markup errors instead of builder
errors. Adjust the tests for this.
2015-04-27 01:15:25 -04:00
Matthias Clasen
d955c6e7e5 Adjust existing tests 2015-04-27 01:15:24 -04:00
Matthias Clasen
8ae4a82ae4 Add tests for the infobar builder parser 2015-04-27 01:15:23 -04:00
Matthias Clasen
cff5e0d15b Add tests for the GtkFileFilter builder parser 2015-04-27 01:15:23 -04:00
Matthias Clasen
95ea81d6d1 Add tests for the GtkDialog builder parser 2015-04-27 01:15:23 -04:00
Matthias Clasen
f11fedb719 Add tests for GtkLevelBar builder parser 2015-04-27 01:15:23 -04:00
Matthias Clasen
66ce0b6509 Add tests for GtkContainer builder parser 2015-04-27 01:15:22 -04:00
Matthias Clasen
e973d49a11 Add tests for the GtkScale builder parser
These tests check various error conditions in GtkScale
custom tags.
2015-04-27 01:15:22 -04:00
Matthias Clasen
d416f352ad Add tests for the GtkCellLayout builder parser
These tests check various error conditions in GtkCellLayout
custom tags.
2015-04-27 01:15:22 -04:00
Matthias Clasen
2c807335c4 Add tests for the GtkLabel builder parser
These tests check various error conditions in GtkLabel
custom tags.
2015-04-27 01:15:22 -04:00
Matthias Clasen
40bb2a1616 reftests: Add a way to compare different runs
gtk-reftest already had an --output=DIR option to tell it where
to save all the resulting images. Now you can combine this with
the --compare-with=DIR option in a second run to make gtk-reftest
compare the .out.png files from the first run with the .out.png
files of the current run, instead of producing .ref.png files.

The intended use for this is to verify that changes do not affect
the generated output.
2015-03-20 16:42:04 -04:00
Benjamin Otte
ec57c6c10b csspathnode: Handle context going away
Sometimes path nodes can survive longer than the style context that
created them. Don't crash in those cases.

Fixes startup of mutter.

Testcase included.

https://bugzilla.gnome.org/show_bug.cgi?id=746407
2015-03-18 18:24:45 +01:00
Benjamin Otte
6c00eba7fb testsuite: Add another random stylecontext test 2015-03-18 15:23:31 +01:00
Benjamin Otte
2670ae4436 reftests: Add a reftest for box sibling ordering 2015-03-18 15:23:31 +01:00
Benjamin Otte
2d013a739a reftests: Fix test on HighContrast theme
We are testing -gtk-icon-style and assume the theme doesn't touch it.
But HighContrast forces symbolic icons. And that breaks the reference
images.

So explicitly set "requested" for everything.
2015-03-16 15:44:42 +01:00
Matthias Clasen
98730f71f9 testsuite: Set some environment variables
These were set manually in some tests, but not consistently.
2015-03-13 17:51:42 -04:00
Matthias Clasen
b756fd42a0 testsuite: Drop test bus
It seems to be buggy in ways that make the test fail
with a critical when the test bus is brought down.
At the same time, drop manual settings of environment
variables that we can set globally.
2015-03-13 17:51:32 -04:00
Matthias Clasen
8615a52ca3 Add some reftests related to textview tags
This test shows that a) tags override the text view style and
b) tags override each other in the expected way.
2015-03-11 22:04:29 -04:00
Philip Withnall
52858f709c gtktreeselection: Fix an abort on selecting an invalid range
gtk_tree_selection_real_modify_range() has a g_return_if_fail() if the
start or end paths passed to it do not correspond to real tree nodes.
However, GtkTreePaths inherently do not have to be valid, so it should
be acceptable to call gtk_tree_selection_select_range() with
non-existent paths. Replace the g_return_if_fail() by a silent return,
and add a unit test.

https://bugzilla.gnome.org/show_bug.cgi?id=712760
2015-03-11 11:24:29 +00:00
Matthias Clasen
ec567e5fad Add a test for builder-constructed file filters 2015-03-08 09:12:21 -04:00
Benjamin Otte
40f2af665d gdkcairo: Bail if surface is in error
Don't try to paint onto an error surface. This happens for example when
gdk_cairo_set_source_pixbuf() is called with a pixbuf that is too big
for Cairo to handle.

Spotted by Christian Boxdörfer
2015-02-25 01:55:28 +01:00
Benjamin Otte
0ab48fcc42 css: Fix _gtk_bitmask_subtract()
We were doing the wrong thing *and* writing uninitialized memory while
doing so. BAD.

Also added tests exposing these.

https://bugzilla.redhat.com/show_bug.cgi?id=1185585
2015-02-25 01:55:28 +01:00
Benjamin Otte
7eecb16404 treeview: Don't create an overly large pixel cache
GPUs generally have problems when you create a 35000px wide surface.
Luckily X catches this and sends a BadAlloc. Which GTK immediately
abort()s on.

Testcase included.

https://bugzilla.redhat.com/show_bug.cgi?id=1163579
2015-02-05 18:57:29 +01:00
Benjamin Otte
edec64cda3 stylecontext: Don't crah when invalidate() is called on saved context
We need to invalidate the root node, not the current one.
Fixes crashes on startup of eclipse.

Testcase included.

https://bugzilla.redhat.com/show_bug.cgi?id=1185828
2015-02-04 21:20:29 +01:00
Benjamin Otte
7e5ac3a58d roundedbox: Treat path segments differently
If a side of the box is 0px wide, make the corners owned by the adjacent
sides. This avoids spilling over of unwanted colors from the 0-width
side into the corner.

New test for this case is included.
2015-01-22 16:25:54 +01:00
Benjamin Otte
f313a8235b reftests: Fix border-style-none reftest
Unset all CSS; Adwaita was messing up things.
2015-01-20 01:15:04 +01:00
Benjamin Otte
ad199e4cf9 stylecontext: Use correct parent style for lookups
After 3a337156d1 style lookups still used
the parent context's style as the parent style, even though after a
gtk_style_context_save() the root style of the style context is the
proper parent.

Testcase attached.
2015-01-07 14:26:48 +01:00
Ting-Wei Lan
ef57ac6bf1 reftests: Fix typo
It causes build failure on MinGW.

https://bugzilla.gnome.org/show_bug.cgi?id=741827
2014-12-22 11:14:17 +08:00
Benjamin Otte
7b6c68adc6 testsuite: Fix test that was committed in a broken state
1) Use font-size instead of color
This makes it easier to compare reference and test because the values
don't change.

2) Actually sort the reference properly
This unbreaks the test.
2014-12-01 04:05:44 +01:00
Matthias Clasen
0438df6d14 Quiet a rule 2014-11-30 19:58:34 -05:00
Matthias Clasen
c5f2f86ff9 Drop an unused function 2014-11-30 19:58:08 -05:00
Benjamin Otte
06952d807a testsuite: Add a bunch of parsing tests for :not() 2014-11-25 19:33:18 +01:00
Ray Strode
3a5d15358e testsuite: add hide-titlebar-when-maximized test for GtkWindow
This commit adds a test that checks whether or not
hide-titlebar-when-maximized can be set before the window is
realized.

https://bugzilla.gnome.org/show_bug.cgi?id=740287
2014-11-24 12:52:25 -05:00
Matthias Clasen
7d35351c7a Update expected results 2014-11-23 18:53:06 -05:00
Matthias Clasen
a09ff50a1d notify test: Exclude a few new properties
The button properties don't make sense on GtkModelButton (indicating
that GtkModelButton should really not be a GtkButton subclass).
2014-11-23 18:30:13 -05:00
Matthias Clasen
824fa0314d Add some more builder tests 2014-11-03 19:07:18 -05:00
Matthias Clasen
e6e511eb46 GtkListBox: Fix a bug in unselection
Ensure that gtk_list_box_get_selected_row returns NULL after
gtk_list_box_unselect_all. Add a testcase that detects this
problem.
2014-10-31 22:34:09 -04:00
Matthias Clasen
60a11333af Update expected results of a11y tests
The new has-tooltip state is showing up in a number of places,
as expected.
2014-10-27 20:03:51 -04:00
Joanmarie Diggs
2893a71a3e Implement support for ATK_STATE_HAS_TOOLTIP
https://bugzilla.gnome.org/show_bug.cgi?id=738982
2014-10-22 22:55:13 -04:00
Emmanuele Bassi
7b6a6c9421 tests/gtk: Add GdkX11GLContext to the whitelist
We cannot create them directly anyway.
2014-10-22 21:20:52 +01:00
Emmanuele Bassi
9464415121 tests/a11y/about: Fix expected text
We recently changed the uppercase licensing text to lower case. The
reference test that checks the contents of the about dialog has to be
fixed to reflect that change.
2014-10-22 21:17:37 +01:00
Matthias Clasen
0f309c9dcf Skip GdkX11GLContext in some object tests
Since it can't be constructed without specifying a GdkWindow,
which we don't have here.
2014-10-21 23:48:12 -04:00
Matthias Clasen
38b315d0be Add a a drop-in test for the GtkBuilder parser 2014-10-18 22:18:59 -04:00