blob: 0b5170e4e41aa2ccc1614f7eaf192fc6dcd970a2 [file] [log] [blame]
<html>
<head>
<script>
if (window.testRunner) {
testRunner.dumpResourceLoadCallbacks();
testRunner.dumpAsText();
testRunner.setShouldPaintBrokenImage(false);
testRunner.waitUntilDone();
}
function loaded() {
var result = document.getElementById('result');
var img = document.getElementById('img');
// The default broken image height in mac is 20.
result.innerHTML = img.offsetHeight >= 10 ? "FAIL" : "PASS";
if (window.testRunner) {
testRunner.setShouldPaintBrokenImage(true);
testRunner.notifyDone();
}
}
function failed() {
var result = document.getElementById('result');
// Report 'FAIL' if WebCore didn't report onError on broken image.
result.innerHTML = "FAIL";
if (window.testRunner) {
testRunner.setShouldPaintBrokenImage(true);
testRunner.notifyDone();
}
}
</script>
<body>
Radar 8610908 - Add a resource delegate method to query if WebCore should paint the broken image.
<div id='img'>
<img id="broken" onError="loaded()" onLoad="failed()" src="resources/broken-image-with-invalid-format.png">
</div>
<div id='result'>
result text.
</div>
</body>
</html>