test-theme: Force default resolution

Clutter no longer hard-codes a resolution of 96 DPI (although that's
still the default), so any assertions of sizes for physical units
may be off.

Fix this by setting up the test environment according to the
assumptions.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/419
This commit is contained in:
Florian Müllner 2019-02-26 02:13:43 +01:00 committed by Georges Basile Stavracas Neto
parent 5a897407d9
commit 70ac33d58c

View File

@ -542,6 +542,9 @@ main (int argc, char **argv)
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
return 1;
/* Make sure our assumptions about resolution are correct */
g_object_set (clutter_settings_get_default (), "font-dpi", -1, NULL);
file = g_file_new_for_path ("st/test-theme.css");
theme = st_theme_new (file, NULL, NULL);
g_object_unref (file);