4 <script src=
"../../resources/js-test.js"></script>
7 <div id=
"container"></div>
9 description('Checks that URIs used in styles that are set via innerHTML are resolved against the current document\'s base URI.');
11 document
.getElementById('container').innerHTML
=
12 '<span id="test-span" style="background-image: url(image.png)"></span>';
14 var currentUri
= document
.location
.href
;
15 var currentPath
= currentUri
.substring(0, currentUri
.lastIndexOf('/'));
16 var cssUriWasResolvedAgainstDocumentUri
= document
.getElementById("test-span").style
.backgroundImage
== 'url(image.png)';
18 // Can't log the actual path since it's different depending on where the test is run.
19 shouldBeTrue('cssUriWasResolvedAgainstDocumentUri');