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
This commit is contained in:
Florian Müllner 2010-10-03 04:16:07 +02:00
parent 560da76387
commit b33ebb450a

View File

@ -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',