Since you are adding a new function to the browser.js component, we would encourage you to extract the function out of the templated javascript file so that it can be tested. A good example of this would be the pgadmin/static/js/size_prettify.js.
For this specific function we found one function that is used from browser.js, and you can Stub that out using
createSpyObject(browser, 'get_preference');
We think the object here is not 100% line coverage but 100% of the behavior should be covered.
Also, suggest you change the variable name perf to preference. Looks like it is a typo.