layout/reftests/flexbox/flexbox-inlinecontent-horiz-1b.xhtml

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/flexbox/flexbox-inlinecontent-horiz-1b.xhtml	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,55 @@
     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 +<!--
    1.10 +     This test inserts a new div into some inline content in a flex container.
    1.11 +     That should split the inline content into two flex items.
    1.12 +-->
    1.13 +<html xmlns="http://www.w3.org/1999/xhtml"
    1.14 +      class="reftest-wait">
    1.15 +  <head>
    1.16 +    <link rel="stylesheet" type="text/css" href="ahem.css" />
    1.17 +    <script>
    1.18 +      function tweak() {
    1.19 +        var flexbox = document.getElementsByClassName("flexbox")[0];
    1.20 +        var insertionPoint = flexbox.firstChild.nextSibling.nextSibling;
    1.21 +
    1.22 +        var newDiv = document.createElement("div");
    1.23 +        newDiv.setAttribute("class", "b");
    1.24 +
    1.25 +        flexbox.insertBefore(newDiv, insertionPoint);
    1.26 +
    1.27 +        document.documentElement.removeAttribute("class");
    1.28 +      }
    1.29 +
    1.30 +      window.addEventListener("MozReftestInvalidate", tweak, false);
    1.31 +    </script>
    1.32 +    <style>
    1.33 +      div { height: 100px; }
    1.34 +      div.flexbox {
    1.35 +        font: 10px Ahem;
    1.36 +        width: 200px;
    1.37 +        display: flex;
    1.38 +      }
    1.39 +      div.a {
    1.40 +        flex: 1 0 20px;
    1.41 +        background: lightgreen;
    1.42 +      }
    1.43 +      div.b {
    1.44 +        flex: 2 0 30px;
    1.45 +        background: yellow;
    1.46 +      }
    1.47 +      div.inflex {
    1.48 +        flex: 0 0 20px;
    1.49 +        background: gray;
    1.50 +      }
    1.51 +    </style>
    1.52 +  </head>
    1.53 +  <body>
    1.54 +    <div class="flexbox"
    1.55 +       ><div class="a"/>text<i>italic</i
    1.56 +       ><div class="inflex"/></div>
    1.57 +  </body>
    1.58 +</html>

mercurial