Make mozcontext more unit tests friendly