Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(183)

Side by Side Diff: LayoutTests/fast/innerHTML/innerHTML-uri-resolution.html

Issue 3400014: Merge 67292 - 2010-09-11 Mihai Parparita <mihaip@chromium.org>... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/517/
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/ChangeLog ('k') | LayoutTests/fast/innerHTML/innerHTML-uri-resolution-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <link rel="stylesheet" href="../js/resources/js-test-style.css"> 4 <link rel="stylesheet" href="../js/resources/js-test-style.css">
5 <script src="../js/resources/js-test-pre.js"></script> 5 <script src="../js/resources/js-test-pre.js"></script>
6 </head> 6 </head>
7 <body> 7 <body>
8 <p id="description"></p> 8 <p id="description"></p>
9 <div id="console"></div> 9 <div id="console"></div>
10 <div id="container"></div> 10 <div id="container"></div>
11 <script> 11 <script>
12 description('Checks that URIs used in styles that are set via innerHTML are re solved against the current document\'s base URI.'); 12 description('Checks that URIs used in styles that are set via innerHTML are re solved against the current document\'s base URI.');
13 13
14 document.getElementById('container').innerHTML = 14 document.getElementById('container').innerHTML =
15 '<span id="test-span" style="background-image: url(image.png)"></span>'; 15 '<span id="test-span" style="background-image: url(image.png)"></span>';
16 16
17 var currentUri = document.location.href; 17 var currentUri = document.location.href;
18 var currentPath = currentUri.substring(0, currentUri.lastIndexOf('/')); 18 var currentPath = currentUri.substring(0, currentUri.lastIndexOf('/'));
19 var cssUriWasResolvedAgainstDocumentUri = document.getElementById("test-span") .style.backgroundImage == 'url(' + currentPath + '/image.png)'; 19 var cssUriWasResolvedAgainstDocumentUri = document.getElementById("test-span") .style.backgroundImage == 'url(' + currentPath + '/image.png)';
20 20
21 // Can't log the actual path since it's different depending on where the test is run. 21 // Can't log the actual path since it's different depending on where the test is run.
22 shouldBeTrue('cssUriWasResolvedAgainstDocumentUri'); 22 shouldBeTrue('cssUriWasResolvedAgainstDocumentUri');
23 23
24 var successfullyParsed = true; 24 var successfullyParsed = true;
25 </script> 25 </script>
26 <script src="../js/resources/js-test-post.js"></script> 26 <script src="../js/resources/js-test-post.js"></script>
27 </body> 27 </body>
28 </html> 28 </html>
OLDNEW
« no previous file with comments | « LayoutTests/ChangeLog ('k') | LayoutTests/fast/innerHTML/innerHTML-uri-resolution-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698