diff options
author | Florian Müllner <fmuellner@gnome.org> | 2018-02-06 23:21:39 +0100 |
---|---|---|
committer | Florian Müllner <fmuellner@gnome.org> | 2018-02-21 14:30:09 +0100 |
commit | 5d1626aba1a16c839ecdc4cd6bfa3fb21180ba88 (patch) | |
tree | 45ca40e41a4c9a4f72077ae62e0290b7be7fca51 /tests | |
parent | b7f083b1dace6d58893d2f40056cac54a8fc7741 (diff) | |
download | gnome-shell-5d1626aba1a16c839ecdc4cd6bfa3fb21180ba88.tar.gz |
tests: Avoid redeclarations with let
Mozjs made this error fatal a while ago, so those tests were broken
by gjs' JS engine updates.
https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/38
Diffstat (limited to 'tests')
-rw-r--r-- | tests/interactive/background-size.js | 6 | ||||
-rwxr-xr-x | tests/interactive/gapplication.js | 12 |
2 files changed, 9 insertions, 9 deletions
diff --git a/tests/interactive/background-size.js b/tests/interactive/background-size.js index e31326977..f3b780fd9 100644 --- a/tests/interactive/background-size.js +++ b/tests/interactive/background-size.js @@ -19,9 +19,9 @@ function test() { let scroll = new St.ScrollView(); vbox.add(scroll, { expand: true }); - let vbox = new St.BoxLayout({ vertical: true, - style: 'padding: 10px;' - + 'spacing: 20px;' }); + vbox = new St.BoxLayout({ vertical: true, + style: 'padding: 10px;' + + 'spacing: 20px;' }); scroll.add_actor(vbox); let tbox = null; diff --git a/tests/interactive/gapplication.js b/tests/interactive/gapplication.js index 60a3630b9..479280bf3 100755 --- a/tests/interactive/gapplication.js +++ b/tests/interactive/gapplication.js @@ -39,25 +39,25 @@ function main() { action.connect('activate', do_action); app.add_action(action); - let action = new Gio.SimpleAction({ name: 'two' }); + action = new Gio.SimpleAction({ name: 'two' }); action.connect('activate', do_action); app.add_action(action); - let action = new Gio.SimpleAction({ name: 'toggle', state: GLib.Variant.new('b', false) }); + action = new Gio.SimpleAction({ name: 'toggle', state: GLib.Variant.new('b', false) }); action.connect('activate', do_action_toggle); action.connect('notify::state', do_action_state_change); app.add_action(action); - let action = new Gio.SimpleAction({ name: 'disable', enabled: false }); + action = new Gio.SimpleAction({ name: 'disable', enabled: false }); action.set_enabled(false); action.connect('activate', do_action); app.add_action(action); - let action = new Gio.SimpleAction({ name: 'parameter-int', parameter_type: GLib.VariantType.new('u') }); + action = new Gio.SimpleAction({ name: 'parameter-int', parameter_type: GLib.VariantType.new('u') }); action.connect('activate', do_action_param); app.add_action(action); - let action = new Gio.SimpleAction({ name: 'parameter-string', parameter_type: GLib.VariantType.new('s') }); + action = new Gio.SimpleAction({ name: 'parameter-string', parameter_type: GLib.VariantType.new('s') }); action.connect('activate', do_action_param); app.add_action(action); @@ -89,7 +89,7 @@ function main() { item.set_action_and_target_value('app.parameter-int', GLib.Variant.new('u', 42)); menu.append_item(item); - let item = Gio.MenuItem.new('Say 43', null); + item = Gio.MenuItem.new('Say 43', null); item.set_action_and_target_value('app.parameter-int', GLib.Variant.new('u', 43)); menu.append_item(item); |