Commit Graph

1349 Commits

Author SHA1 Message Date
Timm Bäder
01ba11fc71 css: Remove outline border radius properties
These are always set to the same value as the corresponding border
radius properties. They are also non-standard, so remove them and
replace them with the border radius properties everywhere.

Fixes #2414
2020-02-08 20:43:16 +01:00
Benjamin Otte
d72301b3c1 testsuite: Get rid of GtkToolbar
Just use GtkBox instead
2020-02-07 14:08:08 +01:00
Matthias Clasen
e45b668e04 testsuite: Misc. updates of expected output
The a11y dumps for action and header bars
have changed in harmless ways.
2020-02-06 18:04:36 -05:00
Matthias Clasen
048effdc5a testsuite: Clean up a11y menu tests
We don't need some of the tests anymore, since
we just have popovers now.
2020-02-06 17:21:06 -05:00
Matthias Clasen
b916723baf testsuite: Improve --generate support
When using the test binary to generate expected
output, don't initialize the test machinery, since
that pollutes the output with noise.
2020-02-06 16:54:59 -05:00
Matthias Clasen
2dba92fd0c tests: Fix infobars in ui files
GtkInfoBar no longer exposes the content_area
as internal child.
2020-02-06 16:54:59 -05:00
Matthias Clasen
a11b1bd08e testsuite: Update expected output 2020-02-06 16:54:59 -05:00
Matthias Clasen
580384e962 tests: Update expected output
The stackswitcher is no longer a box, so it doesn't
have the horizontal state anymore.
2020-02-06 16:54:59 -05:00
Matthias Clasen
18965eec83 testsuite: Update some a11y tests
GtkMenuButton::use-popover no longer exists, remove it
from test files.
2020-02-06 16:54:59 -05:00
Matthias Clasen
8703c7b7ac Merge branch 'better-test-isolation-2' into 'master'
Better test isolation

See merge request GNOME/gtk!1391
2020-02-06 04:53:07 +00:00
Matthias Clasen
e41e8072b1 css tests: Ignore ".csd" vs ".solid-csd"
It it hard to control which of the csd style classes we get,
since it depends on details of the X server or compositor.

Explicitly ignore this difference by replacing .solid-csd
with .csd in the output.
2020-02-05 23:35:39 -05:00
Matthias Clasen
d1bd1270c9 testsuite: Make tests run without a11y bus
Not having an a11y bus around causes warnings from
at-spi, which make tests fail. Explicitly ignore those
warnings.
2020-02-05 22:24:39 -05:00
Matthias Clasen
34cc68003c testsuite: Fix bloomfilter style tests
The results were expecting solid-csd, which is not what
we usually have.
2020-02-05 22:23:52 -05:00
Benjamin Otte
0ad791277a Merge branch 'wip/otte/css' into 'master'
Some CSS cleanup

See merge request GNOME/gtk!1389
2020-02-05 14:04:12 +00:00
Matthias Clasen
b7b251019e testperf: More flexible mark selection
Allow selecting marks not just by their name, but
also by the message detail.
2020-02-05 00:46:47 -05:00
Matthias Clasen
ed742f1d6c testperf: Allow measuring start time
This can be used e.g. to measure how long it takes us
to get the first frame on screen.
2020-02-05 00:46:39 -05:00
Benjamin Otte
b9c880f58d testsuite: Remove the stylecontext test
Stylecontexts are on their way out and I'm removing API that the
testsuite was relying on, so remove the tests.

Put the useful parts of the tests elsewhere.
2020-02-05 04:03:43 +01:00
Alexander Larsson
410541f82b Rename GtkIcon to GtkIconPaintable 2020-02-04 17:19:22 +01:00
Benjamin Otte
138de60ab2 icontheme: Remove GENERIC_FALLBACKS
Instead, rely on people passing fallbacks explicitly.

Alternatively, GThemedIcon provides the functionality to create
fallbacks, which is what GtkImage and the testsuite now use.
That method is slightly better, too, so the expected test results
have been updated accordingly.
2020-02-04 16:51:54 +01:00
Benjamin Otte
571021cbc1 icontheme: Pass fallbacks as optional argument to lookup_icon()
This way, we can remove gtk_icon_theme_choose_icon() completely.
2020-02-04 16:51:54 +01:00
Benjamin Otte
f7a5dd7b8b icontheme: Remove contexts
There is no way to query contexts or do anything useful with them.

So don't keep track of them and don't make them an argument in public
APIs with the docs saying "I don't know what to use here, maybe read
some spec somewhere".
2020-02-04 16:51:54 +01:00
Benjamin Otte
3bba52ed67 icontheme: Remove crayon APIs
We expose no API to get at any colors for drawing symbolics, so we
shouldn't have APIs to draw with them.

Apart from that, those APIs look like a box of crayons, not like an
icontheme.
2020-02-04 16:43:59 +01:00
Benjamin Otte
bbbe39fb44 icontheme: Make text direction a lookup argument
Most users were just forgetting to set the proper flags.
And flags aren't the right way to set this anyway, it was just
acceptable as a workaround during GTK3 to not break API.
2020-02-04 16:41:36 +01:00
Benjamin Otte
b713b9f68d icontheme: Remove async APIs
Widgets would not use them properly. In fact, the only user was using
them wrong.

As icons are loaded async by default, this call isn't necessary.
2020-02-04 16:41:36 +01:00
Benjamin Otte
bfebc2b01a icontheme: Remove gtk_icon_theme_get_default()
The API encouraged wrong usage - most of the users were indeed wrong.

Use the correct version instead:
  gtk_icon_theme_get_for_display (gtk_widget_get_display ())
2020-02-04 16:41:36 +01:00
Alexander Larsson
a1856c30d9 a11y tests: Ignore "active" flag on toplevel
All the a11y tests were failing for me with a window state diff
like this:

-  state: active enabled resizable sensitive showing visible
+  state: enabled resizable sensitive showing visible

I guess the windows in the CI always gets the focus, but not when
I run it here. Generally focus seems asynchronous and hard to rely
on so I just made the test ignore the active state on toplevels.
2020-02-04 15:01:48 +01:00
Alexander Larsson
008eb04125 tests: Initialize dbus before gtk
These days initilizing gtk may create a connection to the sesson bus,
so we have to initialize GTestDBus before initalizing gtk, or we'll
use the address of the "real" session bus (and remember that in the
global).

To further muck things up, g_test_dbus_up() resets important env
vars like DISPLAY and XDG_RUNTIME_DIR, which we have to re-set.
2020-02-04 14:13:33 +01:00
Alexander Larsson
a3be0ec5f0 Don't use xsettings or xft defaults in testsuite
This adds a GDK_DEBUG=default-settings flag which disables reads
from xsettings and Xft resources, and enables this for the testsuite.

This is one less way to get different testresults depending on the
environment. In particular, it was failing the css tests for me
due to getting the wrong font size because i have a different dpi.
2020-02-03 15:11:35 +01:00
Alexander Larsson
d1cd578d59 icon-theme: Add i/o priority to choose_icon_async()
This is set on the GTask and lower priority will be loaded before,
this can be used to prioritize some icons for preloading.
2020-01-30 15:15:08 +01:00
Alexander Larsson
b087f9ca51 icon-theme: Drop the _for_scale() versions and always take scale 2020-01-30 10:53:43 +01:00
Alexander Larsson
e2f778602b icon-theme: Rename GtkIconInfo to GtkIcon 2020-01-30 10:53:43 +01:00
Alexander Larsson
0d666f0cec icon-theme: Use gtk_icon_theme_choose_icon_async in tests 2020-01-29 19:06:16 +01:00
Alexander Larsson
97b24b0732 tests: Use gtk_icon_info_download_colored_texture instead of load_symbolic 2020-01-29 19:06:16 +01:00
Alexander Larsson
dbe021239f icons: Convert use of load() to download_texture() 2020-01-29 19:06:16 +01:00
Matthias Clasen
59994bdd22 performance test: Produce better numbers
Try to isolate the test runs from each other in the
eyes of the kernel scheduler, by sleeping a bit. And
ignore the first run, to avoid cache effects.
2020-01-29 11:06:32 +01:00
Emmanuele Bassi
db5d9ccdfb Remove reftests from expected-fail list
With an updated version of the base CI image it seems some tests that
were failing have started to pass again.
2020-01-29 10:02:02 +01:00
Benjamin Otte
495eaf31d4 css: Use the bloom filter for change matching
Instead of just doing radical change matching on the node itself, also
consider the parent nodes via the bloom filter.

This means a radical change is now also one where the parent
name/id/classes change, but since that's considered a radical change on
the parent already, those things are slow anyway.

Improves the benchmark times for CSS validation during backdrop
transitions in widget-factory from 45ms to 35ms on my machine.
2020-01-28 02:17:03 +01:00
Benjamin Otte
ccdc3ee406 selector: Make :not() selectors not radical
:not() selectors cannot be radical because the bloomfilter only knows if
a value is set in any of the nodes, but cannot determine the opposite
(if a value is not set in at least one node), but that would be required
for:not() selectors.
However, this is very unlikely to happen in the real world, so it's not
worth optimizing.

Unfortunately, change tracking could know this, so by excluding the
:not() selectors from radical changes, the change tracking will now pick
them up. If that turns out to be a performance problem, we need to add a
special category for radical not filters, so change tracking and bloom
filters can deal with them.

The testcase demonstrating the problem in widget-factory has been
extrated and added.
2020-01-28 02:17:03 +01:00
Benjamin Otte
93cf76b068 testsuite: Improve diff_with_file() function
Properly handle diff(1) failing.

In this particular case, the test passed a NULL input file to the diff
(that was fixed, too) and then diff only found one input file and
aborted.

But without this fix, we'd also not catch other abortion reasons for
diff() - as long as it exited in any way, we were happy.
2020-01-28 02:17:03 +01:00
Benjamin Otte
49b47c9133 Remove GtkWidgetPath
... and all associated demos and tests.
2020-01-28 02:17:02 +01:00
Matthias Clasen
16654eeef4 Merge branch 'matthiasc/for-master' into 'master'
Matthiasc/for master

See merge request GNOME/gtk!1348
2020-01-24 16:20:42 +00:00
Timm Bäder
ac4e98f16a testsuite: Add test cases for last commit
Easy enough to test
2020-01-24 06:19:16 +01:00
Matthias Clasen
9eadcd8d55 testsuite: Update mark names
We've changed some of the profiler mark names to
be clearer and more unique. Update the tests that
look for those marks to use the new names.
2020-01-23 23:48:43 -05:00
Matthias Clasen
3120fb29e1 ci: Save syscap files from performance tests
They might become useful at some point.
2020-01-22 15:55:31 -05:00
Matthias Clasen
24fa0f8e28 testsuite: Move the meson performance tests up
Since the binary is moved, there is no need for
the subdirectory here anymore.
2020-01-22 00:59:09 -05:00
Matthias Clasen
878f35515d Make the performance testcase more general
Reuse the performance test for layout and snapshot timings.
2020-01-22 00:59:04 -05:00
Matthias Clasen
68fd796125 css: Make performance test more flexible
Allow to specify the name of the mark that we're looking
for the first instance of.
2020-01-22 00:29:43 -05:00
Matthias Clasen
e9e4bd423a testsuite: Make performance test fail
If a child process exits unsuccessfully,
make the performance test fail.
2020-01-21 19:55:08 -05:00
Matthias Clasen
81ddf4b946 testsuite: Point performance tests at uninstalled schemas
widget-factory won't run otherwise.
2020-01-21 19:51:14 -05:00
Matthias Clasen
23426b0f39 Fix testsuite without -Dprofiler=true
Only build and run the performance tests if we have sysprof.
2020-01-21 18:09:43 -05:00