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

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 <!DOCTYPE HTML>
     2 <html class="reftest-wait">
     3 <head>
     4 <meta charset="utf-8">
     6 <!-- Testcase for bug 879963 regression.
     7      We have two <style> elements with identical @font-face rules, which will
     8      share a common proxy font entry. When the entry is loaded, the references
     9      in both rules must be updated, otherwise text may disappear if the "wrong"
    10      (non-updated) rule is subsequently used.
    11      By disabling the first style element after the document has loaded (and the
    12      user font has been resolved to a real font entry), we can check that the
    13      second rule also works as expected.
    14      Note that if a platform doesn't have any of the local() fonts listed,
    15      the testcase will "pass" harmlessly as a no-op. -->
    17 <style type="text/css" id="style1">
    18 @font-face {
    19   font-family: foo;
    20   src: local("Arial"),
    21        local("DejaVu Sans"),
    22        local("Free Sans"),
    23        local("Open Sans"),
    24        local("Droid Sans"),
    25        local("Roboto");
    26 }
    27 </style>
    29 <style type="text/css" id="style2">
    30 @font-face {
    31   font-family: foo;
    32   src: local("Arial"),
    33        local("DejaVu Sans"),
    34        local("Free Sans"),
    35        local("Open Sans"),
    36        local("Droid Sans"),
    37        local("Roboto");
    38 }
    39 </style>
    41 <style type="text/css">
    42 body {
    43   font-family: serif;
    44 }
    45 .test {
    46   font-family: foo;
    47 }
    48 </style>
    50 <script type="application/javascript">
    51 function run() {
    52   document.getElementById("style1").disabled = true;
    53   document.documentElement.removeAttribute("class");
    54 }
    55 </script>
    57 </head>
    59 <body onload="run()">
    60 <div>
    61 foo <span class="test">bar</span> baz
    62 </div>
    63 </body>
    65 </html>

mercurial