layout/reftests/font-face/dynamic-duplicate-rule-1a.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/font-face/dynamic-duplicate-rule-1a.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,65 @@
     1.4 +<!DOCTYPE HTML>
     1.5 +<html class="reftest-wait">
     1.6 +<head>
     1.7 +<meta charset="utf-8">
     1.8 +
     1.9 +<!-- Testcase for bug 879963 regression.
    1.10 +     We have two <style> elements with identical @font-face rules, which will
    1.11 +     share a common proxy font entry. When the entry is loaded, the references
    1.12 +     in both rules must be updated, otherwise text may disappear if the "wrong"
    1.13 +     (non-updated) rule is subsequently used.
    1.14 +     By disabling the first style element after the document has loaded (and the
    1.15 +     user font has been resolved to a real font entry), we can check that the
    1.16 +     second rule also works as expected.
    1.17 +     Note that if a platform doesn't have any of the local() fonts listed,
    1.18 +     the testcase will "pass" harmlessly as a no-op. -->
    1.19 +
    1.20 +<style type="text/css" id="style1">
    1.21 +@font-face {
    1.22 +  font-family: foo;
    1.23 +  src: local("Arial"),
    1.24 +       local("DejaVu Sans"),
    1.25 +       local("Free Sans"),
    1.26 +       local("Open Sans"),
    1.27 +       local("Droid Sans"),
    1.28 +       local("Roboto");
    1.29 +}
    1.30 +</style>
    1.31 +
    1.32 +<style type="text/css" id="style2">
    1.33 +@font-face {
    1.34 +  font-family: foo;
    1.35 +  src: local("Arial"),
    1.36 +       local("DejaVu Sans"),
    1.37 +       local("Free Sans"),
    1.38 +       local("Open Sans"),
    1.39 +       local("Droid Sans"),
    1.40 +       local("Roboto");
    1.41 +}
    1.42 +</style>
    1.43 +
    1.44 +<style type="text/css">
    1.45 +body {
    1.46 +  font-family: serif;
    1.47 +}
    1.48 +.test {
    1.49 +  font-family: foo;
    1.50 +}
    1.51 +</style>
    1.52 +
    1.53 +<script type="application/javascript">
    1.54 +function run() {
    1.55 +  document.getElementById("style1").disabled = true;
    1.56 +  document.documentElement.removeAttribute("class");
    1.57 +}
    1.58 +</script>
    1.59 +
    1.60 +</head>
    1.61 +
    1.62 +<body onload="run()">
    1.63 +<div>
    1.64 +foo <span class="test">bar</span> baz
    1.65 +</div>
    1.66 +</body>
    1.67 +
    1.68 +</html>

mercurial