Chrome extension API mock for unit testing