Commit b7f083b1 authored by Florian Müllner's avatar Florian Müllner

tests: Fix gnome-shell theme import

The current import rule fails in two ways:
 - commit c62e7a6a moved the theme's stylesheet to the builddir
 - since commit 49c4ba56, assets are addressed as resource:// URIs

Fix both issues by loading and referencing the theme resource instead
of the stylesheet itself.

!38
parent 2bce1f15
......@@ -36,7 +36,7 @@ GJS_DEBUG_OUTPUT=stderr
$verbose || GJS_DEBUG_TOPICS="JS ERROR;JS LOG"
GNOME_SHELL_TESTSDIR="$srcdir/"
GNOME_SHELL_JS="$srcdir/../js"
GNOME_SHELL_DATADIR="$srcdir/../data"
GNOME_SHELL_DATADIR="$builddir/../data"
export GI_TYPELIB_PATH GJS_PATH GJS_DEBUG_OUTPUT GJS_DEBUG_TOPICS GNOME_SHELL_TESTSDIR GNOME_SHELL_JS GNOME_SHELL_DATADIR LD_PRELOAD
......
@import "../../data/theme/gnome-shell.css";
@import url("resource:///org/gnome/shell/theme/gnome-shell.css");
stage {
font: 16pt serif;
......
......@@ -14,6 +14,9 @@ const Environment = imports.ui.environment;
function init(stage) {
Environment.init();
let themeResource = Gio.Resource.load(global.datadir + '/gnome-shell-theme.gresource');
themeResource._register();
let context = St.ThemeContext.get_for_stage(stage);
let stylesheetPath = GLib.getenv("GNOME_SHELL_TESTSDIR") + "/testcommon/test.css";
let theme = new St.Theme({ application_stylesheet: Gio.File.new_for_path(stylesheetPath) });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment