From b33ebb450a693137c0f8eb859d2c244b1320709b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Sun, 3 Oct 2010 04:16:07 +0200 Subject: [PATCH] tests: Fix environment Environment.init() uses Shell.Global, which is not accessible outside the mutter process; allowing to run the function when window.global is undefined fixes the environment for tests. https://bugzilla.gnome.org/show_bug.cgi?id=631091 --- js/ui/environment.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/js/ui/environment.js b/js/ui/environment.js index 6bab8300e..82ecea148 100644 --- a/js/ui/environment.js +++ b/js/ui/environment.js @@ -83,6 +83,9 @@ function init() { return St.describe_actor(this); }; + if (window.global === undefined) // test environment + return; + _blockMethod('Clutter.Event.get_state', 'Shell.get_event_state', 'gjs\'s handling of Clutter.ModifierType is broken. See bug 597292.'); _blockMethod('Gdk.Display.get_device_state', 'global.get_pointer',