<!DOCTYPE html>
<style></style>
<div id="container"></div>
<script>
// Regression test for https://crbug.com/655076. Test passes by not crashing in
// debug build.
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
let container = document.getElementById('container');
let font = 'slow-ahem-loading.cgi?delay=5000';
function makeSpan(family) {
document.styleSheets[0].insertRule(
'@font-face { font-family: ' + family + '; src: url(' + font + '); }', 0);
let span = document.createElement('span');
span.style.fontFamily = family;
span.textContent = 'test';
container.appendChild(span);
}
window.onload = () => {
makeSpan('ahem-1');
setTimeout(() => {
makeSpan('ahem-2');
testRunner.notifyDone();
}, 4000);
};
</script>