Merge autoland to mozilla-central. a=merge
[gecko.git] / layout / reftests / font-face / dynamic-duplicate-rule-1a.html
blob215f09f35106a3900d8be6e6c819ba74c08c0391
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");
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");
39 </style>
41 <style type="text/css">
42 body {
43 font-family: serif;
45 .test {
46 font-family: foo;
48 </style>
50 <script type="application/javascript">
51 function run() {
52 document.getElementById("style1").disabled = true;
53 document.documentElement.removeAttribute("class");
55 </script>
57 </head>
59 <body onload="run()">
60 <div>
61 foo <span class="test">bar</span> baz
62 </div>
63 </body>
65 </html>