Add tests to areStylesLoaded
Fix normalizeUrl and add tests