layout/reftests/flexbox/flexbox-resizeviewport-1.xhtml

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/flexbox/flexbox-resizeviewport-1.xhtml	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,40 @@
     1.4 +<?xml version="1.0" encoding="UTF-8"?>
     1.5 +<!--
     1.6 +     Any copyright is dedicated to the Public Domain.
     1.7 +     http://creativecommons.org/publicdomain/zero/1.0/
     1.8 +-->
     1.9 +<!-- Testcase to be sure a flex container gets reflowed properly when its
    1.10 +     iframe changes size. -->
    1.11 +<html xmlns="http://www.w3.org/1999/xhtml"
    1.12 +      class="reftest-wait">
    1.13 +  <head>
    1.14 +    <style>
    1.15 +      iframe {
    1.16 +        width:  75px;
    1.17 +        height: 75px;
    1.18 +      }
    1.19 +    </style>
    1.20 +    <script>
    1.21 +      function setElementPropertyTo(id, propertyName, propertyValue) {
    1.22 +        var elem = document.getElementById(id);
    1.23 +        elem.style[propertyName] = propertyValue;
    1.24 +      }
    1.25 +
    1.26 +      function tweak() {
    1.27 +        setElementPropertyTo("a", "width", "50px");
    1.28 +        setElementPropertyTo("b", "width", "125px");
    1.29 +        setElementPropertyTo("c", "height", "50px");
    1.30 +        setElementPropertyTo("d", "height", "125px");
    1.31 +        document.documentElement.removeAttribute("class");
    1.32 +      }
    1.33 +      window.addEventListener("MozReftestInvalidate", tweak, false);
    1.34 +    </script>
    1.35 +  </head>
    1.36 +  <body>
    1.37 +    <iframe id="a" src="flexbox-resizeviewport-1-helper.html"/>
    1.38 +    <iframe id="b" src="flexbox-resizeviewport-1-helper.html"/>
    1.39 +    <br/>
    1.40 +    <iframe id="c" src="flexbox-resizeviewport-1-helper.html"/>
    1.41 +    <iframe id="d" src="flexbox-resizeviewport-1-helper.html"/>
    1.42 +  </body>
    1.43 +</html>

mercurial