1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/font-face/resize-detector-iframe.html Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,32 @@ 1.4 +<!DOCTYPE HTML> 1.5 +<html> 1.6 +<head> 1.7 + <title>Resize-notifying IFRAME</title> 1.8 + <script type="application/ecmascript"> 1.9 + 1.10 + var gTarget; 1.11 + 1.12 + /* the test is done after the next resize */ 1.13 + function arm() { 1.14 + gTarget = -1; 1.15 + window.addEventListener("resize", got_resize, false); 1.16 + } 1.17 + 1.18 + /* the test is done after the next resize to wider than the current width */ 1.19 + function arm_for_wider() { 1.20 + gTarget = window.innerWidth; 1.21 + window.addEventListener("resize", got_resize, false); 1.22 + } 1.23 + 1.24 + function got_resize() { 1.25 + if (window.innerWidth > gTarget) { 1.26 + // Remove the class="reftest-wait" from the top window 1.27 + window.top.document.documentElement.removeAttribute("class"); 1.28 + } 1.29 + } 1.30 + 1.31 + </script> 1.32 +</head> 1.33 +<body> 1.34 +</body> 1.35 +</html>