Sorry that I didn't explain clearly in previous comment. The reason that I need to replace toBlob is because Travis is running on firefox 18, that means toBlob api will not work on Travis and I have to mock this api for testing. It seems not possible to force the Travis switch the platform from 18 to 25 because running on the nightly will make Travis busted easily. I'll try to replace the toBlob to make the test work, or any better idea to make the unit test move on?