Bug 1032166 Follow up to bug 959201 with tests

nit: a space to separate the declaration and action part would be better