[gnome-shell] tests: Fix environment
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] tests: Fix environment
- Date: Mon, 4 Oct 2010 22:22:48 +0000 (UTC)
commit b33ebb450a693137c0f8eb859d2c244b1320709b
Author: Florian Müllner <fmuellner gnome org>
Date: Sun Oct 3 04:16:07 2010 +0200
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 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/environment.js b/js/ui/environment.js
index 6bab830..82ecea1 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',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]