| OLD | NEW |
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script type="text/ecmascript"> | 3 <script type="text/ecmascript"> |
| 4 function logSuccessOrFailure() | 4 function logSuccessOrFailure() |
| 5 { | 5 { |
| 6 var console = document.getElementById('console'); | 6 var console = document.getElementById('console'); |
| 7 var image = document.getElementById('image'); | 7 var image = document.getElementById('image'); |
| 8 | 8 |
| 9 if (image.naturalHeight && image.naturalWidth) | 9 if (image.height && image.width) |
| 10 console.innerHTML = "PASSED"; | 10 console.innerHTML = "PASSED"; |
| 11 else | 11 else |
| 12 console.innerHTML = "FAILED"; | 12 console.innerHTML = "FAILED"; |
| 13 | 13 |
| 14 if (window.testRunner) | 14 if (window.testRunner) |
| 15 testRunner.notifyDone(); | 15 testRunner.notifyDone(); |
| 16 } | 16 } |
| 17 | 17 |
| 18 function changeSrc() | 18 function changeSrc() |
| 19 { | 19 { |
| 20 if (window.testRunner) { | 20 if (window.testRunner) { |
| 21 testRunner.dumpAsText(); | 21 testRunner.dumpAsText(); |
| 22 testRunner.waitUntilDone(); | 22 testRunner.waitUntilDone(); |
| 23 } | 23 } |
| 24 var image = document.getElementById('image'); | 24 var image = document.getElementById('image'); |
| 25 | 25 |
| 26 if (image.naturalHeight || image.naturalWidth) { | 26 if (image.height || image.width) { |
| 27 console.innerHTML = "FAILED"; | 27 console.innerHTML = "FAILED"; |
| 28 return; | 28 return; |
| 29 } | 29 } |
| 30 | 30 |
| 31 image.src = "../security/resources/green250x50.png"; | 31 image.src = "../security/resources/green250x50.png"; |
| 32 | 32 |
| 33 // The image may not be loaded, so just wait a little | 33 // The image may not be loaded, so just wait a little |
| 34 // before checking if it was loaded. | 34 // before checking if it was loaded. |
| 35 window.setTimeout("logSuccessOrFailure()", 100); | 35 window.setTimeout("logSuccessOrFailure()", 100); |
| 36 } | 36 } |
| 37 </script> | 37 </script> |
| 38 </head> | 38 </head> |
| 39 <body onload="changeSrc()"> | 39 <body onload="changeSrc()"> |
| 40 <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> | 40 <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> |
| 41 <p> You should see PASSED once and 250 x 50 green box. The console shoul
d also show a blocked attempt to load a local resource.</p> | 41 <p> You should see PASSED once and 250 x 50 green box. The console shoul
d also show a blocked attempt to load a local resource.</p> |
| 42 <p id='console'> </p> | 42 <p id='console'> </p> |
| 43 <!-- This image should be blocked (see security/local-image-from-remote.
html) --> | 43 <!-- This image should be blocked (see security/local-image-from-remote.
html) --> |
| 44 <img id='image' src="file:///tmp/LayoutTests/http/tests/security/resourc
es/compass.jpg"/> | 44 <img id='image' src="file:///tmp/LayoutTests/http/tests/security/resourc
es/compass.jpg"/> |
| 45 </body> | 45 </body> |
| 46 </html> | 46 </html> |
| OLD | NEW |