1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/layout/reftests/svg/sizing/dynamic--inline-resize-window-height.xhtml Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,52 @@ 1.4 +<!-- 1.5 + Any copyright is dedicated to the Public Domain. 1.6 + http://creativecommons.org/publicdomain/zero/1.0/ 1.7 +--> 1.8 +<html xmlns="http://www.w3.org/1999/xhtml" class="reftest-wait"> 1.9 + <head> 1.10 + 1.11 + <!-- From https://bugzilla.mozilla.org/show_bug.cgi?id=294086 --> 1.12 + 1.13 + <title>Test: resize of window height</title> 1.14 + 1.15 + <!-- 1.16 + This testcase checks that SVG embedded inline with a percentage height is 1.17 + updated correctly when the window is resized. 1.18 + --> 1.19 + 1.20 + <style type="text/css"> 1.21 + 1.22 +html, body, div { 1.23 + padding: 0; 1.24 + border: 0; 1.25 + margin: 0; 1.26 + width: 100%; 1.27 + height: 100%; 1.28 + background: red; 1.29 + overflow: hidden; 1.30 +} 1.31 + 1.32 + </style> 1.33 + <script type="text/javascript"> 1.34 + 1.35 +var initial_height = top.innerHeight; 1.36 +top.innerHeight /= 2; 1.37 + 1.38 +function restore_height() 1.39 +{ 1.40 + top.innerHeight = initial_height; 1.41 + document.documentElement.removeAttribute('class'); 1.42 +} 1.43 + 1.44 +document.addEventListener("MozReftestInvalidate", restore_height, false); 1.45 + 1.46 + </script> 1.47 + </head> 1.48 + <body> 1.49 + 1.50 + <svg xmlns="http://www.w3.org/2000/svg" width="5000" height="100%"> 1.51 + <rect width="100%" height="100%" fill="lime"/> 1.52 + </svg> 1.53 + 1.54 + </body> 1.55 +</html>