layout/reftests/abs-pos/select-1-dynamic.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/abs-pos/select-1-dynamic.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,31 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html>
     1.6 +  <select style="position: relative" size=4>
     1.7 +    <option>bar</option>
     1.8 +  </select>
     1.9 +  <select style="position: relative">
    1.10 +    <option>bar</option>
    1.11 +  </select>
    1.12 +  <script>
    1.13 +    function injectAbsPosKid(s) {
    1.14 +      var option = document.createElement("option");
    1.15 +      option.appendChild(document.createTextNode("foo"));
    1.16 +      option.style.position = "absolute";
    1.17 +      option.style.top = "100px";
    1.18 +      s.insertBefore(option, s.firstChild);
    1.19 +
    1.20 +      var div = document.createElement("div");
    1.21 +      div.appendChild(document.createTextNode("bar"));
    1.22 +      div.style.position = "absolute";
    1.23 +      div.style.top = "200px";
    1.24 +      s.appendChild(div);
    1.25 +    }
    1.26 +    onload = function() {
    1.27 +      var s1 = document.querySelectorAll("select")[0];
    1.28 +      var s2 = document.querySelectorAll("select")[1];
    1.29 +      injectAbsPosKid(s1);
    1.30 +      injectAbsPosKid(s2);
    1.31 +      s2.selectedIndex = 0;
    1.32 +    };
    1.33 +  </script>
    1.34 +</html>

mercurial