1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/font-face/download-3-ref.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,39 @@ 1.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" 1.5 + "http://www.w3.org/TR/html4/strict.dtd"> 1.6 +<html lang="en-US"> 1.7 +<head> 1.8 + <title></title> 1.9 + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 1.10 + <style type="text/css"> 1.11 + 1.12 + @font-face { 1.13 + font-family: "MarkA"; 1.14 + src: url(../fonts/markA.ttf); 1.15 + } 1.16 + 1.17 + body { font-family: "MarkA"; } 1.18 + 1.19 + </style> 1.20 +</head> 1.21 +<body> 1.22 + 1.23 +<div id="t" style="visibility:hidden; width: -moz-fit-content">ABC</div> 1.24 +<script> 1.25 + // Force a reflow to make sure we start our font download now 1.26 + document.body.offsetWidth; 1.27 + window.addEventListener("load", 1.28 + function() { 1.29 + var n = document.getElementById("t"); 1.30 + var w = document.defaultView.getComputedStyle(n, "").width; 1.31 + var h = document.defaultView.getComputedStyle(n, "").height; 1.32 + var d = document.createElement("div"); 1.33 + d.style.width = w; 1.34 + d.style.height = h; 1.35 + d.style.backgroundColor = "green"; 1.36 + n.parentNode.removeChild(n); 1.37 + document.body.appendChild(d); 1.38 + }, 1.39 + false); 1.40 +</script> 1.41 +</body> 1.42 +</html>