| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script type="text/ecmascript"> | 3 <script type="text/ecmascript"> |
| 4 function changeSrc() | 4 function changeSrc() |
| 5 { | 5 { |
| 6 if (window.testRunner) | 6 if (window.testRunner) |
| 7 testRunner.dumpAsText(); | 7 testRunner.dumpAsText(); |
| 8 | 8 |
| 9 var image = document.getElementById('image'); | 9 var image = document.getElementById('image'); |
| 10 | 10 |
| 11 if (image.height || image.width) { | 11 if (image.naturalHeight || image.naturalWidth) { |
| 12 console.innerHTML = "FAILED"; | 12 console.innerHTML = "FAILED"; |
| 13 return; | 13 return; |
| 14 } | 14 } |
| 15 | 15 |
| 16 // We reset the image src to the same url to check that it was | 16 // We reset the image src to the same url to check that it was |
| 17 image.src = "file:///tmp/LayoutTests/http/tests/security/resources/c
ompass.jpg"; | 17 image.src = "file:///tmp/LayoutTests/http/tests/security/resources/c
ompass.jpg"; |
| 18 } | 18 } |
| 19 </script> | 19 </script> |
| 20 </head> | 20 </head> |
| 21 <body onload="changeSrc()"> | 21 <body onload="changeSrc()"> |
| 22 <p> Test case for <a href="https://bugs.webkit.org/show_bug.cgi?id=17897
"> bug 17897 </a>: Not Rendering Images Imported from XHTML Document </p> | 22 <p> Test case for <a href="https://bugs.webkit.org/show_bug.cgi?id=17897
"> bug 17897 </a>: Not Rendering Images Imported from XHTML Document </p> |
| 23 <p> This test checks that setting an image url should lead to load even
if the image was in error and the url is not changed. </p> | 23 <p> This test checks that setting an image url should lead to load even
if the image was in error and the url is not changed. </p> |
| 24 <p> For this test to pass, you should see 2 messages in the console </p> | 24 <p> For this test to pass, you should see 2 messages in the console </p> |
| 25 <p id='console'> </p> | 25 <p id='console'> </p> |
| 26 <!-- This image should be blocked (see security/local-image-from-remote.
html) --> | 26 <!-- This image should be blocked (see security/local-image-from-remote.
html) --> |
| 27 <img id='image' src="file:///tmp/LayoutTests/http/tests/security/resourc
es/compass.jpg"/> | 27 <img id='image' src="file:///tmp/LayoutTests/http/tests/security/resourc
es/compass.jpg"/> |
| 28 </body> | 28 </body> |
| 29 </html> | 29 </html> |
| OLD | NEW |