multiple-sets-1.html (787B)
1 <!DOCTYPE html> 2 <html class=reftest-wait> 3 <body onload=step()> 4 <iframe id=a src=multiple-sets-frame.html></iframe> 5 <iframe id=b src=multiple-sets-frame.html></iframe> 6 <script> 7 var events = 2; // wait for load event and MozReftestInvalidate 8 9 function step() { 10 if (--events == 0) { 11 var a = document.getElementById("a"); 12 var b = document.getElementById("b"); 13 var a_win = a.contentWindow; 14 var b_win = b.contentWindow; 15 var a_doc = a.contentDocument; 16 var b_doc = b.contentDocument; 17 var face = new a_win.FontFace("Ahem", "url(../fonts/Ahem.ttf)"); 18 a_doc.fonts.add(face); 19 b_doc.fonts.add(face); 20 face.load().then(function() { 21 document.documentElement.className = ""; 22 }); 23 } 24 } 25 26 window.addEventListener("MozReftestInvalidate", step); 27 </script>