modify size determination so that the unit tests also work in browser
mode