Commit Graph

864 Commits

Author SHA1 Message Date
Matthias Clasen
dfb45f4396 Add a test for cursor names
This tests both that all standard cusor yield a cursor, and that
unknown cursor names yield NULL.
2016-10-17 19:11:32 -04:00
Timm Bäder
4384628afb Remove GtkAction 2016-10-18 00:34:41 +02:00
Timm Bäder
ead36206a3 Remove GtkActionGroup 2016-10-18 00:34:41 +02:00
Timm Bäder
1bb3501ef7 Fix unittests 2016-10-18 00:34:41 +02:00
Timm Bäder
8245374f9c tests/testylecontext: Don't double-free widgetpath 2016-10-18 00:34:41 +02:00
Timm Bäder
f7d22fec7b Remove GtkRecentAction 2016-10-18 00:34:41 +02:00
Timm Bäder
d963ede668 Remove GtkUIManager 2016-10-18 00:34:41 +02:00
Timm Bäder
62b2949fa2 Remove GtkActivatable 2016-10-18 00:34:41 +02:00
Timm Bäder
41f5d3b14c Remove GtkToggleAction 2016-10-18 00:34:40 +02:00
Timm Bäder
53ab8eb46d Remove GtkRadioAction 2016-10-18 00:34:40 +02:00
Timm Bäder
dece018994 Remove GtkAlignment 2016-10-18 00:29:19 +02:00
Timm Bäder
3ad624d6c0 adjustment: Remove deprecated API 2016-10-18 00:29:19 +02:00
Timm Bäder
37c728be12 testsuite/gtk: Use a GtkMenuButton to test exposing objects 2016-10-18 00:29:19 +02:00
Timm Bäder
d844abe066 Remove GtkTable 2016-10-18 00:29:18 +02:00
Benjamin Otte
4322b69528 cssprovider: Return void, not TRUE
Parsing a css file always succeeds as CSS can recover from parsing
errors.
2016-10-17 17:41:03 +02:00
Benjamin Otte
dbeeaf7de6 cssprovider: Remove GError out argument from load functions
People should use the GtkCssProvider::parsing-error signal instead.
2016-10-17 16:52:05 +02:00
Benjamin Otte
cda617df4d API: sizegroup: Remove gtk_size_group_set_ignore_hidden() 2016-10-16 18:18:58 +02:00
Benjamin Otte
1d4f23da8e API: container: Remove GtkContainer::child property 2016-10-16 18:18:58 +02:00
Benjamin Otte
4df6ddad54 API: container: Remove gtk_container_set_border_width() 2016-10-16 18:18:58 +02:00
Benjamin Otte
1518fe0a8f API: stylecontext: Remove state argument from getters
The argument must always be the current state.
2016-10-16 18:18:58 +02:00
Benjamin Otte
9b9b475f0a API: stylecontext: Remove regions 2016-10-16 18:17:21 +02:00
Timm Bäder
f2c455fedb Remove GtkThemingEngine
As well as the corresponding GtkCssEngineValue used to parse it in css.
2016-10-16 18:17:21 +02:00
Timm Bäder
9f930c08a6 ui: Don't unnecessarily set GtkEntry:invisible-char 2016-10-16 18:17:21 +02:00
Timm Bäder
ed184b3935 Remove GtkIconFactory
Move the icon size lookup API into gtkicontheme.c
2016-10-16 18:17:21 +02:00
Timm Bäder
9fd1a1bbe3 widget: Remove cursor-aspect-ratio/window-dragging style properties
And replaces its usages in GtkTextView/GtkStyleContext with a hard-coded
0.04 which was the default value for cursor-aspect-ratio.  Also remove
the public gtk_draw_insertion_cursor which used draw_insertion_cursor
which in turn looked up cursor-aspect-ratio
2016-10-16 18:17:21 +02:00
Timm Bäder
878f2e4107 widget: Remove deprecated margin-left/right properties 2016-10-16 18:17:21 +02:00
Timm Bäder
96d9abded8 widget: Remove deprecated style properties 2016-10-16 18:17:21 +02:00
Timm Bäder
040db1efcd Remove some deprecated GdkColor style properties 2016-10-16 18:17:21 +02:00
Timm Bäder
134556435d Remove various deprecated GtkOrientable subclasses 2016-10-16 18:17:21 +02:00
Timm Bäder
d06d17b81e Remove gtkcolorsel(dialog).{c,h} 2016-10-16 18:17:21 +02:00
Timm Bäder
9cfbaf4916 Remove gtkfontsel.{c,h} 2016-10-16 18:17:21 +02:00
Timm Bäder
2acc31b46a Remove GtkHandleBox 2016-10-16 18:17:21 +02:00
Timm Bäder
155fa4664d Remove GtkImageMenuItem 2016-10-16 18:17:21 +02:00
Timm Bäder
8a3595236d reftests: Remove GtkMisc tests 2016-10-16 18:17:21 +02:00
Timm Bäder
5d3a5ffdfb Fix a few css/a11y test cases
They were broken because of missing -icon-stock properties in GtkEntry
and GtkButton not creating an adjustment child anymore.
2016-10-16 18:17:21 +02:00
Timm Bäder
7088d9d294 reftests: Remove celldenderer-pixbuf-stock
The stock properties tested here don't exist anymore.
2016-10-16 18:17:21 +02:00
Timm Bäder
367f13a76f Remove GtkArrow 2016-10-16 18:17:21 +02:00
Timm Bäder
ad155fb26c Remove GtkStock API from GtkImage 2016-10-16 18:17:21 +02:00
Timm Bäder
f37cb8f9d0 reftests: Remove GtkMisc properties from now non-misc widgets 2016-10-16 18:17:21 +02:00
Timm Bäder
f45dadadd0 box: Remove 'padding' child property 2016-10-16 18:17:21 +02:00
Benjamin Otte
eace2cf421 API: Remove gdk_window_set_background()
Backgrounds are always transparent black.
2016-10-16 18:17:21 +02:00
Benjamin Otte
021fe010b6 API: Remove GtkPlug, GtkSocket and GtkWin32EmbedWidget 2016-10-16 18:17:21 +02:00
Timm Bäder
fb3d9022ad Remove GtkHBox 2016-10-16 18:17:21 +02:00
Benjamin Otte
d2a8667f83 API: Remove GtkStatusIcon 2016-10-16 18:17:21 +02:00
Matthias Clasen
d053d5c58f Rename Makefile references from 3.0 to 4.0
This is almost certainly incomplete.
Needs careful scrutiny
2016-10-07 10:34:50 -04:00
Matthias Clasen
4a035403d3 Fix the scrolledwindow test
These tests were written for the propagate-nat-size semantics,
so opt in to it.
2016-08-31 15:04:57 -04:00
Philip Withnall
76721e736e gtkicontheme: Don’t emit warning about fallback theme when in unit tests
In order to eliminate g_test_expect_message() (which doesn’t work with
G_LOG_USE_STRUCTURED), make the warning about the fallback theme not
existing be conditional on the icon theme search path containing a
system path. Any application code which modifies the search path does so
through appends and prepends, so this should not affect whether the
warning is emitted in production.

https://bugzilla.gnome.org/show_bug.cgi?id=769485
2016-08-06 17:13:25 -04:00
Matthias Clasen
1306f780ab tests: Avoid g_test_expect_message
Instead of using g_test_expect_message, just ignore the warning.
2016-08-06 17:13:25 -04:00
Matthias Clasen
80d329a3e7 Skip GtkShortcutLabel::accelerator in notify test
This property is not freely settable, since the string
gets parsed.
2016-08-02 23:59:34 -04:00
Matthias Clasen
5ab2b8f562 Make icontheme test work with structured logging
Since we've opted in to G_LOG_USE_STRUCTURED, this test
now needs to do its thing using a log writer function.
2016-08-02 23:23:43 -04:00
Matthias Clasen
d9c07c0a6a Skip GdkDrawingContext in default value tests
GdkDrawingContext objects can't be freely constructed.
2016-08-02 22:32:25 -04:00
Emilio Pozuelo Monfort
ca6c928c5b Properly declare the font CSS property
https://bugzilla.gnome.org/show_bug.cgi?id=769004
2016-07-28 17:13:15 +02:00
Emilio Pozuelo Monfort
b9f61e3a8e Don't use one-stop gradients
They are deprecated, which causes a warning that makes
the test fail.

https://bugzilla.gnome.org/show_bug.cgi?id=769004
2016-07-28 17:12:25 +02:00
Matthias Clasen
0f32919503 Stop using one-stop gradients in reftests
This is causing warnings now that make the tests fail.
2016-07-26 07:25:01 -04:00
Cosimo Cecchi
d9dd7eb757 reftests: override GSETTINGS_SCHEMA_DIR when running tests
The reftest depends on a schema we install ourselves. Instruct GIO to
look in the build directory to avoid a cyclic dep.

https://bugzilla.gnome.org/show_bug.cgi?id=768930
2016-07-25 08:34:52 -04:00
Matthias Clasen
c7654c737c Add a css parser test for background-blend-mode 2016-07-05 13:16:43 -04:00
Matthias Clasen
1ebfe1db56 Skip GdkDrawingContext in some tests
GdkDrawingContext is not freely constructible, so we need
to skip it in the notify and finalize tests.
2016-06-20 15:27:20 -04:00
Philip Chimento
76bacfde6e style cascade: Allow cascades with more ancestors
Previously a style cascade's parent could not have a parent itself. That
represented the two levels at which you could add a style provider: at
the screen level, with gtk_style_context_add_provider_for_screen(), and
at the style context level, with gtk_style_context_add_provider().

This commit changes no functionality, but this change will be necessary
for adding style providers in the future that apply to a subtree of the
widget tree. It relaxes the requirement that a style cascade's parent
must not have a parent, since in the future a style context may be
affected by any number of parent widgets' style contexts.

https://bugzilla.gnome.org/show_bug.cgi?id=751409
2016-06-19 19:47:05 -04:00
Tristan Van Berkom
d6187c9a02 scrolledwindow test: Check natural width for max content size
The maximum content size does not increase the minimum request
but only ensures that both minimum and natural requests do not
exceed the maximum setting.
2016-06-09 14:57:10 +09:00
Emmanuele Bassi
32885605c7 Fix build
Commit 023f406c96 has a typo that results
in this error:

../../../testsuite/gtk/notify.c: In function 'test_type':
../../../testsuite/gtk/notify.c:679:54: error: expected expression
before ')' token
    (g_str_equal (pspec->name, "max-content-width") ||)
                                                      ^
2016-06-08 14:20:02 +01:00
Matthias Clasen
023f406c96 test: Skip GtkScrolledWindow::max-content- properties
The allowed values for the max-content- properties depend
on the value of the min-content- properties, in a way that
our simple test is not prepared to deal with. Just skip
them for now.
2016-06-08 09:04:33 -04:00
Christian Dywan
b97c490b87 object test: Also test object type properties
Old patch found in bugzilla, it still applies and doesn't
cause the test to fail.

https://bugzilla.gnome.org/show_bug.cgi?id=556254
2016-06-05 22:15:00 -04:00
Georges Basile Stavracas Neto
3962b907bb testsuite: add tests for scrolledwindow
This patch adds a set of tests for scrolled window
sizing, covering both min- and max-content width and
height.

https://bugzilla.gnome.org/show_bug.cgi?id=742281
2016-06-05 11:04:41 -03:00
Matthias Clasen
5264209bf1 a11y tests: Update expected output
These changes were caused by the introduction of GtkStackAccessible.
2016-06-01 14:18:46 -04:00
Matthias Clasen
1dbbe7f251 button css node test: Update for switch style changes
We no longer add the redundant .slider style class in GtkSwitch.
Update expected results to reflect that.
2016-06-01 13:12:19 -04:00
Matthias Clasen
28b9e16272 css node tests: Update expected results
We were not propagating direction changes in some places,
evidently. Now we do.
2016-06-01 13:11:27 -04:00
Matthias Clasen
eace965a19 scale css node test: Adapt to changes
The style classes are reflected in the output here.
2016-05-19 12:26:47 -04:00
Javier Jardón
101da71ee3 Use upstream gettext
https://bugzilla.gnome.org/show_bug.cgi?id=373745
2016-05-16 20:46:19 +01:00
Matthias Clasen
c27b8b48ab Update color name css style test
Verify rebeccapurple too.
2016-05-05 15:37:42 -04:00
Matthias Clasen
ef7ccab188 defaultvalue test: Skip GdkMonitor::geometry
We never return NULL for ::geometry and ::workarea. Just skip
these properties.
2016-05-02 12:42:13 -04:00
Matthias Clasen
a91fc65291 label css style test: fix font syntax 2016-04-26 00:07:01 -04:00
Matthias Clasen
2968098f74 Remove debug spew 2016-04-26 00:07:00 -04:00
Matthias Clasen
7855294594 Fix css parser tests
These tests were affected by the font and linear-gradient parsing
changes.
2016-04-26 00:03:09 -04:00
Matthias Clasen
db1a39a817 notify test: Skip GtkFontButton::font-name
This is not freely settable.
2016-04-25 23:09:19 -04:00
Paolo Borelli
c574ef0954 textiter: add unit test for forward_to_line_end
Surprisingly we had no unit test for this method
2016-04-22 08:54:25 +02:00
Matthias Clasen
5ab6ff6b5e Expand css style font tests
Test more of the syntax of the font: shorthand.
2016-04-18 14:38:53 -04:00
Matthias Clasen
5993875d38 Fix the css style font test
Setting the font: shorthand to something like smaller is not
in line with the css spec. Just set the font-size: property
for this.

Also fix the other font: shorthand to specify size and family
according to the css spec.
2016-04-18 11:46:58 -04:00
Matthias Clasen
4a9cf8527e Add some more accelerator / modifier tests 2016-04-17 01:54:43 -04:00
Matt Watson
7200ac8e56 Fix label css test
The default font size of 10pt will now properly render as 13.33px,
but we shouldn't use the default anyway as that can be controlled
by user settings
2016-04-14 11:52:11 -07:00
Matt Watson
871b19f9dd reftests: test rem size 2016-04-12 16:59:40 -07:00
Matt Watson
92a496fdec reftests: test em size 2016-04-12 16:59:40 -07:00
Olivier Fourdan
b3ca11a6cb test: do not remove files on distclean
bugzilla: https://bugzilla.gnome.org/show_bug.cgi?id=764686
2016-04-08 17:00:12 +02:00
Matthias Clasen
43a568395b Add some tests for GdkRectangle
In particular, we're testing corner cases with empty rectangles
here.
2016-03-28 19:54:55 -04:00
Matthias Clasen
669336cf95 Expand visual tests a bit 2016-03-28 19:28:57 -04:00
Matthias Clasen
785a425516 Add tests for seat apis
These are just some basic sanity tests.
2016-03-28 19:22:36 -04:00
Matthias Clasen
6f2d5a6290 Move autotestkeywords to testsuite
All the 'make check' and installed tests are now in testsuite/,
and tests/ is just a collection manual test programs.
2016-03-28 17:56:13 -04:00
Matthias Clasen
89973118f3 Add some more visual tests
These are just basic tests to ensure that the visual implementation
of a backend is sound.
2016-03-26 14:56:36 -04:00
Matthias Clasen
2374e2aa3b Add a test for the system rgba visual
The main point of this test is to ensure that the pixel_details
getters work as expected.
2016-03-26 10:10:57 -04:00
Matthias Clasen
4c8557fa35 Add a css node test for scales 2016-03-25 13:22:11 -04:00
Matthias Clasen
caa804613d add a css style test for font: smaller 2016-03-24 22:58:43 -04:00
Matthias Clasen
24f54d50c4 Update css node test for GtkSwitch changes 2016-03-24 22:43:27 -04:00
Matthias Clasen
1716e0b038 Revert "add a css style test for font: smaller"
This reverts commit a4ed154b03.

The misparsing that is tested here will not be fixed in 3.20,
so keep this test out of the stable branch.
2016-03-24 22:43:27 -04:00
Matthias Clasen
a4ed154b03 add a css style test for font: smaller 2016-03-24 08:25:11 -04:00
Matthias Clasen
d6ca66b712 Run a11y tests with csd for make check
I've made this change for installed tests a while ago. It doesn't
make sense for distcheck to do it differently.
2016-03-22 14:55:55 -04:00
Matthias Clasen
e44a87fe94 Fix the textview-margins reftest
This test has a word that wouldn't fit in the room we have with
a window width of 100, and then we get clipped in the one case
but not the other. Make the window a little wider, so it fits.
2016-03-11 16:46:52 -05:00
Benjamin Otte
b7285592f9 cssanimation: Compute progress correctly
We were computing the wrong progress, in particular when the iteration
count was non-integer.

Test included.
2016-03-11 16:39:34 +01:00
Matthias Clasen
3015f46170 Fix another installed test typo
This one was causing us to install invalid .test files and thereby
breaking all continuous tests :-(
2016-03-07 10:50:43 -05:00
Matthias Clasen
8a1da56393 Fix a typo
This was causing the tools tests to not be installed and,
consequently, never run on continuous.
2016-03-07 07:30:00 -05:00
Matthias Clasen
5c248bbd79 Make the settings test fail
Small thinko: We only get to see the test artifacts in
continuous if the test fails. So make it fail, temporarily.
2016-03-05 15:49:34 -05:00
Matthias Clasen
d69100547c testsuite: Remove a test that isn't valid with csd
With csd, the allocation of the window will be larger than the
default size, since it includes borders and decorations. Just
remove this check.
2016-03-05 13:47:41 -05:00
Matthias Clasen
b2e6ad640d Add a test that dumps settings
This is not much of a test, tbh. But it will give us a convenient
dump of all GTK+ settings in continuous, which helps with tracking
down test failures that might depend on settings.
2016-03-05 13:41:47 -05:00
Matthias Clasen
8a62a36d2e Update a11y test output
These tests can now assume that the csd header bar will be there.
2016-03-05 10:40:06 -05:00
Matthias Clasen
6ce3c78b7a Run accessibility tests always with CSD
This avoids differences in the output that are caused
by the presence or absence of the header bar.
2016-03-05 10:40:06 -05:00
Matthias Clasen
fa36f34fcf Update expected output of a11y tests
The window type attribute shows up here now.
The caret mode changes also affect some tests.
2016-03-04 23:51:39 -05:00
Matt Watson
d46d50b761 reftests: add a test for animated box shadow updating clip
This was just fixed by 3e06942847
2016-03-03 16:14:39 -08:00
Matt Watson
35d9702173 reftests: rename util file frame-inhibitor
We'll use the label-text-shadow-changes-modify-clip utils
more generically, lets name the file after its function.
2016-03-03 16:09:13 -08:00
Timm Bäder
8b70115d5e revealer-size: Fix animation setting
Turn animations off before testing, for all test functions containing
"no_animations".
2016-03-03 21:05:37 +01:00
Timm Bäder
1c544e4237 Add GtkRevealer sizing tests
https://bugzilla.gnome.org/show_bug.cgi?id=762996
2016-03-03 18:54:08 +01:00
Matthias Clasen
8205a304e8 Add a css node test for comboboxes 2016-03-02 15:20:31 -05:00
Matthias Clasen
444703f2bb css node tests: Update notebook results
This is fallout from changing the tab states.
2016-03-01 23:25:56 -05:00
Matthias Clasen
b1d691dbfd testsuite: Fix up icontheme test
This test was relying on GtkIconTheme using g_print for
debug spew. Adapt it to use g_logv instead.
2016-02-28 21:40:23 -05:00
Matthias Clasen
9dad9a4b59 testsuite: Strip newlines from g_warning and g_error
g_logv adds one for us already.
2016-02-28 12:23:12 -05:00
Matthias Clasen
8ff40b5d14 Plug a small memory leak 2016-02-26 15:52:19 -05:00
Benjamin Otte
3056d793a4 cssparser: Make _gtk_css_parser_has_number() a bit smarter
Previously we just checked the first character. And if that was a "-" as
in "-gtk-some-special-value", we assumed it was a number. Which it
clearly wasn't.

Test included
2016-02-23 04:22:19 +01:00
Matthias Clasen
c30d542a17 Some more CSS node tests for notebooks 2016-02-15 14:20:48 -05:00
Benjamin Otte
d3e8cf87aa testsuite: Don't use deprecated APIs 2016-02-13 06:41:29 +01:00
Benjamin Otte
0cda3ba3e8 calc: Allow subterms with '(' ')' bracketing
Some more tests included.
2016-02-13 04:49:08 +01:00
Benjamin Otte
63d1f80742 css: Add support for '*' and '/' to calc()
More tests are included.
2016-02-13 04:49:08 +01:00
Benjamin Otte
4a9fa1e750 css: Add API to handle order when printing calc()
Also, add some tests and update old ones to print calc() statements
correctly.
2016-02-13 04:49:08 +01:00
Benjamin Otte
65dd9da44a css: Add support for sums to calc()
This requires adding code to do math on number values:
  gtk_css_number_value_multiply()
and
  gtk_css_number_value_try_add()
were added to achieve that.

Some tests are included.
2016-02-13 04:49:08 +01:00
Benjamin Otte
cd6dc954f2 css: Add initial support for calc()
So far, calc() only supports literals, ie it's completely useless.
2016-02-13 04:49:08 +01:00
Benjamin Otte
f9c2982ddc testsuite: No warnings on type conversions please
long is 32bit on win64, so it's int cast to pointer of different size, and gcc doesn't like that.
2016-02-11 03:44:47 +01:00
Matthias Clasen
e0f31ab7bb Add css node tests for box packing
More tests to ensure that CSS node order is always physical
left-to-right.
2016-02-08 09:34:19 +01:00
Matthias Clasen
4a465e6832 Fix levelbar css node tests
These were affected by the recent change to level offset handling.
At the same time, make the test files more realistic by updating
the level offsets when we set a custom range.
2016-02-07 11:43:13 +01:00
Matthias Clasen
4d40bd4474 Fix stylecontext tests
This was broken by f7ec9c98ef,
since type names are no longer used at all in CSS matching.
2016-02-06 09:59:48 +01:00
Benjamin Otte
0c12601208 cssimageradial: Only allow at "<position>" after other props
Don't allow syntax like
  at top left circle
but follow the spec about requiring the at <position> right before the
comma.

This is porbably because
  circle at 10px 10px
could be interpreted as
  circle 10px at 10px
with the now disallowed syntax, too.

Test included.
2016-02-05 19:31:47 +01:00
Benjamin Otte
982da040b2 cssimageradial: Only emit one error for wrong position
Test included.
2016-02-05 19:31:47 +01:00
Matthias Clasen
f2e08d3a9c css tests: Fix style tests
Commit d0fd7990c3 changed
the location of builtin themes, breaking the loading of
the empty theme in test-css-style.
2016-02-05 16:35:43 +01:00
Matthias Clasen
132abb8749 css tests: Fix expected output
This is fallout from f7ec9c98ef.
2016-02-05 16:35:43 +01:00
Matthias Clasen
3446760060 reftests: Make separator-size test pass in HighContrastInverse
After neutralizing the stack background, the notebook itself
was peeking through.
2016-01-31 16:54:48 -05:00
Matthias Clasen
6e2c74aaad Trivial formatting fix 2016-01-31 14:11:01 -05:00
Matthias Clasen
1e0ca71eca reftests: Make label-text-shadow-changes-modify-clip test more reliable
This test was failing in continuous, where the tests are running
in a VM with disabled animations. Make the test adapt to that
situation by changing the rui on the fly if we find that animations
are disabled.
2016-01-31 14:11:01 -05:00
Matthias Clasen
2423eb11e3 reftests: Add a message to the test output
Emit a message that ends up in the test output if we are modifying
the test on the fly.
2016-01-31 14:11:01 -05:00
Matthias Clasen
a898dc6e9f reftests: Rename a source file
Easier to keep track of things if the sources are names after
the test they are used in.
2016-01-31 14:11:01 -05:00
Matthias Clasen
5a2feab8c0 reftests: Make animation-direction test more reliable
This test was failing in continuous, where the tests are running
in a VM with disabled animations. Make the test adapt to that
situation by changing the reference ui on the fly if we find
that animations are disabled.
2016-01-31 13:51:54 -05:00
Matthias Clasen
a66287a62e Fix the border-image-excess-size reftest
This was failing because the grid is now respecting border
width too. Making the selector more specific so it only
applies to the toolbars fixes this.
2016-01-30 21:50:00 -05:00
Matthias Clasen
27b4bfc1cf Fix another reftest
Make sure the notebook in the separator-size reftest does not
peek through, by giving it a transparent background.
2016-01-30 21:43:49 -05:00
Matthias Clasen
bbfc547b89 Fix some reftests under wayland
Tests need to use popup windows, in order to avoid differences
due to CSD.
2016-01-30 21:11:12 -05:00
Matthias Clasen
d400ecca14 Remove entry-progress-coloring reftest
We don't recolor text over progress anymore, so this
tests a no longer existing feature.
2016-01-30 11:32:06 -05:00
Matthias Clasen
586522d83c Use TAP output for installed tests 2016-01-30 11:04:22 -05:00
Matthias Clasen
f375b275c8 Run reftests with HighContrastInverse too
For installed tests, we run the reftests with all the builtin
themes (minus platform-specific ones). Add HighContrastInverse
to that list.
2016-01-30 10:10:39 -05:00
Matthias Clasen
f887fec55c Add a css style test for color names
Verify that we support all the css color names, with their expected
rgb values.
2016-01-29 18:23:25 -05:00
Matthias Clasen
8219a6b226 Use an GtkImage instead of GtkArrow
GtkArrow is deprecated, and the recommended replacement
is GtkImage.
2016-01-29 13:21:01 -05:00
Matthias Clasen
866193f6af reftests: get icon-vfuncs test almost working again
The remaining difference here is GtkArrow, which is deprecated
and has not been updated to the latest CSS rendering standards.
2016-01-29 13:10:03 -05:00
Matthias Clasen
8cbe309f36 css node tests: Update expected output
The entry undershoot change needs to be reflected in the
test output.
2016-01-27 13:23:58 -05:00
Matthias Clasen
d5d6a050c5 Update expected output of a11y tests
This is the outcome of a recent fix to default values
for a GtkPaned property.
2016-01-25 16:01:07 -05:00
Matthias Clasen
7097a4ed64 Fix another quoting error in installed tests
Same as the previous one. I should fix my silly mistakes before
copying them around...
2016-01-25 13:02:13 -05:00
Matthias Clasen
cce493493c testsuite: Fix a quoting error
This was breaking continous testing. Oops.
2016-01-25 10:56:19 -05:00
Matthias Clasen
bb92428112 notebook: Implement rtl flipping for CSS nodes
Use gtk_box_gadget_reverse_children and gtk_css_node_reverse_children
to flip the children of the header_gadget and the tabs_gadget when
appropriate.

Add new CSS node tests to verify that the node order is updated
as expected in all cases.
2016-01-19 21:40:47 -05:00
Matthias Clasen
e3b49b2d6c Update expected output of a11y tests
This reflects my recent change to messagedialog titles.
2016-01-19 09:19:31 -05:00
Matthias Clasen
c24c56a143 Forgotten file 2016-01-18 09:41:46 -05:00
Matthias Clasen
65ae48d707 Add more CSS node tests for notebooks 2016-01-18 07:41:33 -05:00
Matthias Clasen
83eb36a896 Add CSS node tests for checkbutton rtl flipping 2016-01-18 00:29:29 -05:00
Matthias Clasen
121aec6de8 Add css node tests for expander rtl flipping 2016-01-18 00:24:53 -05:00
Benjamin Otte
f6757e0c0c reftests: Fix up for easy CSS changes
This is mostly search and replace ala
  GtkButton => button
  GtkWindow => window
  .button => button
or removing style properties that aren't used anymore like
  -GtkButton-default-border: 0
2016-01-18 05:05:35 +01:00
Benjamin Otte
b7f32ed451 reftests: Remove test
We no longer match subtypes, so remove the test for it.
2016-01-18 05:05:35 +01:00
Matthias Clasen
2ec16c9f91 Add css node tests for right-to-left levelbars 2016-01-13 13:39:41 -05:00
Matthias Clasen
a0fdbff938 Add css node tests for paned node ordering 2016-01-13 00:41:44 -05:00
Matthias Clasen
e386fcae04 Update expected output of notebook css node test
The stack node is new.
2016-01-13 00:26:48 -05:00
Matthias Clasen
6d239cfba7 Add a css style test for adjacent states
This test checks that the selector E:state + F works as expected.

https://bugzilla.gnome.org/show_bug.cgi?id=722727
2016-01-10 14:51:36 -05:00
Matthias Clasen
1eaf035a78 reftests: Drop deprecated style properties 2016-01-08 18:11:07 -05:00
Matthias Clasen
fe35836168 Update expect output of a11y tests 2016-01-08 18:11:07 -05:00
Matthias Clasen
e84f1ae3bb Update the list of required cursors
We're now using standard cursor names for DND, so check for these.
2016-01-08 18:11:07 -05:00
Matthias Clasen
d76fb63ba8 Add a test for ltr vs rtl boxes.
This tests that horizontal boxes flip their child nodes
according to text direction to maintain the left-to-right
ordering of child nodes for both text directions.
2016-01-06 14:57:42 -05:00
Matthias Clasen
a519a1a928 CSS node tests: Add a way to test rtl vs ltr
CSS nodes have a linear sibling relationship; this is supposed
to correspond to left-to-right placement in horizontal arrangements.
This commit explicitly sets the text direction to rtl if the
filename ends in .rtl.ui, so we can test differences in node
tree layout between text directions.
2016-01-06 14:57:42 -05:00
Matthias Clasen
d9a70bc56a Add a CSS style test for gradients
This mainly just tests that gradients are properly
reproduced by gtk_style_context_to_string.
2016-01-04 13:59:48 -05:00
Matthias Clasen
fcea12f790 Add some tests for radial gradient parsing
These are the examples from the CSS spec.
2016-01-04 13:59:24 -05:00
Matthias Clasen
d8e1fd6079 Update expected output
The previous commit changed the format of the output
generated by the CSS style tests.
2016-01-03 17:23:59 -05:00
Matthias Clasen
12be432df7 Skip GdkX11DeviceManagerCore in default value tests
We already skip the XI2 implementation, and the core
one needs the same treatment.
2016-01-03 16:14:43 -05:00
Matthias Clasen
e1634d18de Update expected output for CSS style tests
The format for CSS values changed slightly in one of the
previous commits.
2016-01-03 15:41:09 -05:00
Matthias Clasen
3c26aef826 Use a custom theme for CSS style tests
Use a custom, empty theme and stop importing reset-to-defaults.css.
This avoids overwriting initial values, so our initial value
filtering works better.
2016-01-03 15:39:55 -05:00
Matthias Clasen
d0e648d4f6 Update expected output for node and style tests
The previous commit changed the format of the output.
2016-01-03 14:41:43 -05:00
Cosimo Cecchi
28e185dd1b tests: fix Makefile.am syntax
It requires a tab character, or the build will fail.
2016-01-03 11:33:19 -08:00
Matthias Clasen
489928cbb4 Fix the build 2016-01-03 12:05:57 -05:00
Matthias Clasen
f7a93c015c Forgotten file
I forgot to add this file to source control when the new tests
were initially added.
2016-01-03 12:02:11 -05:00
Matthias Clasen
2dd8d1ad53 Update expected results of a11y tests
All of these now have a harmless extra "panel".
2016-01-03 10:56:11 -05:00
Matthias Clasen
7a01741575 Skip GdkX11DeviceManagerCore in notify tests
We already skip the XI2 implementation, and the core
one needs to the same treatment.
2016-01-03 10:34:40 -05:00
Matthias Clasen
ed5ebc0711 Add a css style test for currentColor 2016-01-03 09:19:31 -05:00
Matthias Clasen
33be60b0ab Add a css style test for inherit and initial 2016-01-03 09:19:31 -05:00
Matthias Clasen
1ec34ae085 Add a css style test for :first/last/only-child 2016-01-03 09:19:31 -05:00
Matthias Clasen
82a571e0ca Add a css style test for font inheritance 2016-01-03 09:19:31 -05:00
Matthias Clasen
905ab53c71 Add a test framework for CSS styles
This uses the same function for dumping CSS nodes and styles
as the CSS node test. It can be used to test aspects of inheritance
and matching, as well as initial values.

No actual tests yet.
2016-01-03 09:19:31 -05:00
Matthias Clasen
864693e5aa Add CSS node tests for levelbars 2016-01-03 09:19:31 -05:00
Matthias Clasen
0ce5075748 Add CSS node test for progressbars 2016-01-03 09:19:31 -05:00
Matthias Clasen
5c4efb09e2 Add a CSS node test for buttons 2016-01-03 09:19:31 -05:00
Matthias Clasen
78d715af22 Add a CSS node test for entries 2016-01-03 09:19:30 -05:00
Matthias Clasen
669ced3984 Add a CSS node test for notebooks 2016-01-03 09:19:30 -05:00
Matthias Clasen
d2c1203ef1 Add a test framework for CSS nodes
No actual tests yet.
2016-01-03 09:19:30 -05:00
Matthias Clasen
d83e9539c5 Fix stylecontext tests to work
Some of the tests don't work anymore because they test
features of saved style contexts that have changed, and some
now trigger deprecation warnings.
2016-01-03 01:25:07 -05:00
Matthias Clasen
6da57d61d5 Skip GdkX11DeviceManagerCore in finalize tets
We already skip the XI2 implementation, and the core
one needs to the same treatment.
2016-01-03 01:23:35 -05:00
Matthias Clasen
2b27096fc3 Fix outline-radius css parser test
The outline-radius properties all got a -gtk prefix.
2015-12-27 17:32:45 -05:00
Matthias Clasen
ab182126df Fix the pseudo-classes-known css test
The test needs to be updated for the renamed :dnd pseudo class.
We also need to add a .errors file for the deprecation errors
that we are now producing.
2015-12-27 17:32:30 -05:00
Matthias Clasen
c4ca671a9e test-css-parser: Add a way to generate output
Use test-css-parser --generate foo.css to see the parser
output on stdout. This makes it more convenient to add new
css files to the testsuite.
2015-12-27 17:26:45 -05:00
Matthias Clasen
d0d8671c02 Forgotten files 2015-12-23 01:57:22 -05:00
Matthias Clasen
ef71eabfc5 Add parser tests for animation properties
This adds tests for animation-name, animation-duration,
animation-timing-function, animation-iteration-count,
animation-direction, animation-play-state, animation-delay
and animation-fill-mode.
2015-12-22 22:29:38 -05:00
Matthias Clasen
8f44383253 Add a parser tests for transition properties
This adds tests for transition-property, transition-delay
and transition-timing-function.
2015-12-22 22:29:38 -05:00
Matthias Clasen
2b6ab1b8bd Add parser tests for min-width and min-height 2015-12-22 22:29:38 -05:00
Matthias Clasen
a0487f0516 Add parser tests for border-image properties
This adds tests for border-image-source, border-image-repeat,
border-image-slice and border-image-width.
2015-12-22 22:29:38 -05:00
Matthias Clasen
5c704621ac Fix import css parser tests
Don't use nonexisting properties here either
2015-12-21 16:33:50 -05:00
Matthias Clasen
31f319d1c7 css parser test: Drop remaining made-up properties
These are not used anymore in any tests, and the css parser
doesn't support parsing custom properties anymore.
2015-12-21 14:53:09 -05:00
Matthias Clasen
ece3d33858 Fix css parser integer test
Use margin-top instead of a made-up property.
2015-12-21 14:52:06 -05:00
Matthias Clasen
ce859a7c65 Update css parser value none test
The test is affected by icon-shadow being renamed and by
engine being deprecated.
2015-12-21 14:44:00 -05:00
Matthias Clasen
0fb84c5a68 Fix the css parser value initial test
This was affected by the recent renaming of icon-shadow to
-gtk-icon-shadow. Also, it produces an error now because
engine is deprecated.
2015-12-21 14:37:09 -05:00
Matthias Clasen
474f5b7784 Fix the css parser value inherit test
This was affected by the recent renaming of icon-shadow to
-gtk-icon-shadow. Also, it produces an error now because
engine is deprecated.
2015-12-21 14:35:11 -05:00
Matthias Clasen
db094092ae Update font-weight css parser test
This is affected by the recent fix for parsing font-weight.
2015-12-21 14:32:01 -05:00
Matthias Clasen
ea651dcd31 Update font-family css parser test
There are no errors here.
2015-12-21 14:31:10 -05:00
Matthias Clasen
b931821f5e Update the css parser unknown pseudo-class test
Use an existing property instead of a made-up one.
2015-12-21 14:29:17 -05:00
Matthias Clasen
8ff127940f Update the css parser selector test
Use an existing property instead of the made-up one, here.
2015-12-21 14:27:52 -05:00
Matthias Clasen
1f298c385f Drop the css parser enum test
We are no longer using and non-css properties, and css enums
are all parsed with custom code.
2015-12-21 14:25:46 -05:00
Matthias Clasen
e567f23bcd Update another css parser test
This test was using the engine property, which has
been deprecated and thus generates an error now.
Instead, use the font property.
2015-12-21 14:18:51 -05:00
Matthias Clasen
dcc3dd1211 Update css parser test for declarations
Use existing CSS properties instead of made-up ones.
2015-12-21 14:14:36 -05:00
Matthias Clasen
0035d526c3 test-css-parser: Drop unused property
The rgba-property is no longer used in any tests, drop it.
2015-12-21 14:11:10 -05:00
Matthias Clasen
6eb4102bf2 Update css parser tests for colors
Use the color property instead of a made-up rgba-valued property.
2015-12-21 14:10:20 -05:00
Matthias Clasen
a21025e096 test-css-parser: Drop unused property
The border-property is no longer used in any tests, drop it.
2015-12-21 14:07:08 -05:00
Matthias Clasen
b56980eba2 Update css parser test for borders
Use the border-image-width property instead of a made-up
border-valued property.
2015-12-21 14:06:07 -05:00
Matthias Clasen
0c9c6b882e Update border-radius-shorthand tests
The name of the css file is in the error output, so we
have to update that after the file was recently renamed.
2015-12-21 14:01:03 -05:00
Matthias Clasen
01f2d4dd0f Update pseudo-class test
We have some more pseudo-classes now, and some are printed
out with their CSS name.
2015-12-21 13:59:24 -05:00
Matthias Clasen
6d86ce516d test-css-parser: Drop unused properties
We don't have any tests involving these style
properties, so don't install those.
2015-12-21 13:57:26 -05:00
Matthias Clasen
a5ccef7470 Don't test parsing boolean values in css
CSS doesn't have any boolean properties.
2015-12-21 13:51:23 -05:00
Matthias Clasen
698fe18521 Add missing tests to Makefile.am 2015-12-21 06:58:29 -05:00
Matthias Clasen
3daeb70182 Fix the build 2015-12-21 06:45:32 -05:00
Matthias Clasen
d081b309d5 Add some css parser tests
These tests exercise many allowed ways to specify various
properties.
2015-12-21 06:28:25 -05:00
Sébastien Wilmet
e2d1042b6b Don't use gtk_text_iter_begins_tag() (deprecated)
Use gtk_text_iter_starts_tag() instead.

https://bugzilla.gnome.org/show_bug.cgi?id=759092
2015-12-08 19:56:57 +01:00
Matthias Clasen
64431a17e3 Add a test for required cursors
We use these cursors in GTK+, so check for their existence.
2015-12-05 19:09:17 -05:00
Matthias Clasen
f19cadeaf3 testsuite: Fix notify tests
GtkStatusIcon tests don't work well under xwayland either, so just
skip them unconditionally.
GtkEntry now fails because the update of the im-module is no longer
deferred to an idle, and (gtk-im-simple) is not a valid module
name, so skip this property.
2015-12-04 13:22:26 -05:00
Benjamin Otte
05bdecb2f8 reftests: Add test for missing-image handling
Add a test that ensures that missing images get the icon-effect properly
applied.
2015-12-04 17:44:51 +01:00
Matthias Clasen
cbde3ee01f css: Add a :dnd pseudoclass
This will be used for drag highlighting.
2015-12-02 23:23:36 -05:00
Benjamin Otte
2396265523 css: Rename -gtk-image-effect to -gtk-icon-effect
This is a property for icons, so we should name it as such.
2015-12-02 00:29:31 +01:00
Benjamin Otte
afd0e28437 iconhelper: Improve size determination for surfaces
Instead of just working for image surface, this should now work for all
bounded surfaces.

Test included.
2015-12-02 00:29:29 +01:00
Sébastien Wilmet
1a8f3e2462 textiter: fix bug in case insensitive backward search
'win.lines' contains the same content as the GtkTextBuffer, so to find
@match_start, forward_chars_with_skipping() is called with
skip_decomp=FALSE (the last parameter). So far so good.

On the other hand, the content 'lines' (the needle split in lines) is
casefolded and normalized for a case insensitive search. So,
forward_chars_with_skipping(..., skip_decomp=TRUE) must be called only
for the portion of text containing the needle.

Since 'start_tmp' contains the location at the start of the match, we
can simply begin at that location to find the end of the match.

Unit tests are added.

https://bugzilla.gnome.org/show_bug.cgi?id=758698
2015-11-30 19:46:16 +01:00
Matthias Clasen
8640216be7 Add a test for deprecated css properties 2015-11-23 22:31:20 -05:00
Benjamin Otte
d75989a52b cssstyle: Don't store custom css properties
This makes custom CSS properties no longer configurable. But it avoids
crashes when loading custom themes, so that's a good thing.

Testcase included.

https://bugzilla.redhat.com/show_bug.cgi?id=1281234
2015-11-20 21:22:15 +01:00
Matthias Clasen
9202bc244e Fix make check
For some reason, GtkFileChooserNative is causing the defaultvalue
test to fail. I couldn't track this down quickly, so skip the
type for now.
2015-11-20 00:13:20 -05:00
Matthias Clasen
8f3ffe4d08 Work around g_test_dbus annoyance
Without iterating a mainloop for a bit, g_test_dbus_down() will
give us an error.
2015-11-20 00:13:20 -05:00
Benjamin Otte
0a4e88b79b cssprovider: Have a section on import error
When loading a nonexisting CSS file using
gtk_css_provider_load_from_file() or gtk_css_provider_load_from_path()
we would emit the error using a NULL scanner. Don't do that, because
we'll have a NULL section in that case and error handlers don't like
that.

Testcase attached.

https://bugzilla.redhat.com/show_bug.cgi?id=1277959
2015-11-16 17:39:15 +01:00
Matthias Clasen
fe65c3ac4c Add one more selector to CSS parsing tests
Add an E + F selector to the selector parsing tests.
It is a CSS selector that we support.
2015-11-14 19:04:42 -05:00
Matthias Clasen
2d054fa6ae Always pass the right state in style context getters
Otherwise, we are causing warnings that break make check.
2015-11-14 19:03:57 -05:00
Matthias Clasen
dedab98bbb testsuite: Skip GtkFileChooserNative for notification tests
Like all the other GtkFileChooser implementations, this one
emits some unneeded notifications.
2015-11-14 19:03:10 -05:00
Sébastien Wilmet
1685da6f69 textbuffer: nicer get_iter functions, without return values
Avoid crashes when passing an invalid location to a
gtk_text_buffer_get_iter_at_*() function.

A first attempt added boolean return values to know if @iter has been set to
the exact location, but it breaks Python and JS bindings because the out
parameter is already a return value in those languages.

Unit tests are added.

https://bugzilla.gnome.org/show_bug.cgi?id=735341
2015-11-12 17:50:39 +01:00
Matthias Clasen
fde91c3bec Revert "textbuffer: nicer get_iter functions"
This reverts commit a9a1c00cc9.

Unfortunately, adding the boolean return broke both the python
and javascript bindings, since they now return a tuple consisting
of the boolean and the out argument.
2015-11-12 09:58:28 -05:00
Benjamin Otte
61db7da2ef testsuite: Remove a bunch of broken tests
These tests have either been commented out for way too long or use APIs
that we don't want to support.
2015-11-04 05:06:23 +01:00
Benjamin Otte
a58d8bdcbc cssprovider: Have a section when parsing style properties
Signal handlers expect a section to be present, so provide them with
one.

New testcase included.

https://bugzilla.gnome.org/show_bug.cgi?id=757240
2015-10-28 19:37:27 +01:00
Matthias Clasen
339cb1fe6b Fix reftests
Multiple reftests were damaged by the element name transition.
Repair them. The region reftests are no longer needed, since
we no longer do regions.
2015-10-27 20:06:24 -04:00
Matthias Clasen
5ee39befb8 Fix make check
Don't try setting GtkShortcutsShortcut::accelerator to a
random value, it only accepts strings that it can parse.
2015-10-27 13:27:43 -04:00
Matthias Clasen
e9aa33527f Don't use g_slist_next in the testsuite
We generally use ->next directly.
2015-10-20 06:14:57 -04:00
Matthias Clasen
65aa367029 Add some more builder parser tests
These tests contain non-canonical and non-existing property names.
2015-10-20 06:14:57 -04:00
Sébastien Wilmet
a9a1c00cc9 textbuffer: nicer get_iter functions
Avoid crashes when passing an invalid location to a
gtk_text_buffer_get_iter_at_*() function.

A boolean is returned to know if @iter has been set to the exact
location.

Unit tests are added.

https://bugzilla.gnome.org/show_bug.cgi?id=735341
2015-10-16 08:43:27 +02:00
Matthias Clasen
af8c2d2f7b Improve text a11y test
Test appending text as well as replacing the entire text.
Insert non-ASCII text to verify offsets are correct.
2015-10-15 22:35:38 -04:00
Bastien Nocera
3df565cbf7 reftests: Rename reftest
After figuring out what the actual problem is, name the reftest
properly.
The actual problem is that the use-fallback property is ignored when
using an icon-name on GtkImage.
2015-10-08 14:44:19 +02:00
Bastien Nocera
8bd98c08aa reftests: Add test for GtkImage use-fallback property
Fallback seems to be working in the GtkIconTheme test suite, but fails
in GtkImage itself.

This is a test for a bug in the Bluetooth settings. An icon named
"phone-apple-iphone" should fallback to "phone" if the
gnome-icon-theme-extras package isn't installed.
2015-10-08 14:05:35 +02:00