Make sure stylesheets are loaded before drawing
Add tests to areStylesLoaded
Fix normalizeUrl and add tests
Merge pull request #1274 from aadsm/css-loading

Load stylesheets before draw