I have JavaScript application in OpenLayers 3, and my base layer is created from local tiles. I work only in my computer so I do not know why I have CORS error.
A solution to this is to serve your code, and make it run on a server, you could use web server for chrome to easily serve your pages.