Functioning mock in browser