Bug 957923 - Fix unit tests for running in DESKTOP=1 environment

https://bugzilla.mozilla.org/show_bug.cgi?id=957923