Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<html class="test-wait">
<meta charset="utf-8">
<title>Setting @font-face after establishing baseComputedStyle should not crash</title>
<link rel="help" href="https://crbug.com/40406235">
<style>
body { transition: background-color 1s }
.green { background-color: green }
</style>
<style id="sheet"></style>
<script>
window.onload = () => {
document.body.className = "green";
// Needs these frames to establish a baseComputedStyle.
requestAnimationFrame(() => {
requestAnimationFrame(() => {
requestAnimationFrame(() => {
sheet.innerText = "@font-face { font-family: notfound; src: url(notfound.ttf) }";
document.documentElement.classList.remove('test-wait');
});
});
});
};
</script>