blob: 5893d48b3c46aea28bd14cc6e1b228d2bddb1e3d [file] [log] [blame]
<!DOCTYPE html>
<html>
<head>
<style>
@font-face {
font-family: 'SVGraffiti';
src: url("../../svg/custom/resources/graffiti.svg") format(svg)
}
</style>
</head>
<body>
This test makes sure that drawing text in an SVG font that resides in another document doesn't cause load events to be fired. The test is successful if the image load hander line blow occurs after the line that says it should be before the image load handler.
<pre id="log"></pre>
<script>
function log(line) {
document.querySelector("#log").innerText += line + '\n';
}
function imageLoadHandler() {
log("Image load handler occurred.");
}
if (window.testRunner)
testRunner.dumpAsText();
</script>
<img src="data:image/png;charset=binary;base64,iVBORw0KGgoAAAANSUhEUgAAAEIAAAAaCAYAAAF0jrrkAAACmWlUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iWE1QIENvcmUgNS4xLjIiPgogICA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczpkYz0iaHR0cDovL3B1cmwub3JnL2RjL2VsZW1lbnRzLzEuMS8iPgogICAgICAgICA8ZGM6cmlnaHRzPgogICAgICAgICAgICA8cmRmOkFsdD4KICAgICAgICAgICAgICAgPHJkZjpsaSB4bWw6bGFuZz0ieC1kZWZhdWx0Ij5Db3B5cmlnaHQgwqkgMjAxMyBBcHBsZSBJbmMuIEFsbCByaWdodHMgcmVzZXJ2ZWQuPC9yZGY6bGk+CiAgICAgICAgICAgIDwvcmRmOkFsdD4KICAgICAgICAgPC9kYzpyaWdodHM+CiAgICAgIDwvcmRmOkRlc2NyaXB0aW9uPgogICAgICA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIgogICAgICAgICAgICB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iPgogICAgICAgICA8eG1wOkNyZWF0b3JUb29sPkFkb2JlIEltYWdlUmVhZHk8L3htcDpDcmVhdG9yVG9vbD4KICAgICAgPC9yZGY6RGVzY3JpcHRpb24+CiAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+ClkMcMUAAAGcSURBVFgJ7ZkxTgMxEEV3EamgCqKFFgnECYAjwB2gpwwdPdSUELhCuAJwAsQBQguIiioS4T8jrywU7URYMJGckSZ2Yq//n++xvdmtL/s346rd6oX29u/WaTp1puk0qg1OJp+xCWN1qC0OliL36rBroViD7KiDHYs1itqzwjnQALc5oQxgmDMA13/mDmBmDSit5srgGWq5WdkantFYx/ZcGeI4vynZqla40JME+K/ynjcJiJx6k7gWieVFqDjZtnAfwfZaHc3KgITXdJwBHs2LRE8EGjW8SCDCi7cS4LNRcYS75QTY2B0fntMBPjaYBRLH3iSepMTQm8QW8+FJ4ggCmBeJkbD7gYEjiW4kQOl1gKUc/qs+FNCm/GMSoFdKTOLy17+tC+BdHhbkT7CShCD2jpx7uUO+pFaaEDH2K1XwxkoVAgHICrKDLHE7NsCeBWO/YN9YKzkj4kQsqXIxF6KqTiTEvue/8TgjXiVPiPbkPICtShXiTbFvyHlKFazEpfGgyFfljQgoUZoQ54o5vEYg+NRKWhrhDUYafFr/At4ROug1jBe0AAAAAElFTkSuQmCC" onload="imageLoadHandler();">
<div style="font-family: SVGraffiti;">This is some dummy text</div>
<script>
log("This line should occur before the image load handler.");
</script>
</body>
</html>