layout/reftests/margin-collapsing/block-abs-pos-1-dyn.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/margin-collapsing/block-abs-pos-1-dyn.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,39 @@
     1.4 +<!DOCTYPE html>
     1.5 +<html class="reftest-wait">
     1.6 +<head>
     1.7 +<!-- Note: CSS 2.1 allows guessing the static position of an absolutely
     1.8 +     positioned element whose offsets are 'auto' (initial value), i.e.
     1.9 +     the reference of this test is just one of many possible outcomes.
    1.10 +     See http://www.w3.org/TR/CSS21/visudet.html#abs-non-replaced-width -->
    1.11 +<style type="text/css">
    1.12 +#in-flow-top {
    1.13 + height: 20px;
    1.14 + margin-bottom: 20px;
    1.15 + background-color: green;
    1.16 +}
    1.17 +#abs-pos {
    1.18 + width: 20px; height: 20px;
    1.19 + background-color: blue;
    1.20 + margin-top: 10px;
    1.21 + margin-bottom: 10px;
    1.22 +}
    1.23 +#in-flow-bottom {
    1.24 + height: 20px;
    1.25 + margin-top: 20px;
    1.26 + background-color: lightgreen;
    1.27 +}
    1.28 +</style>
    1.29 +<script type="text/javascript">
    1.30 +function test() {
    1.31 + document.getElementById('abs-pos').style.position = 'absolute';
    1.32 + document.documentElement.removeAttribute('class');
    1.33 +}
    1.34 +document.addEventListener('MozReftestInvalidate', test, false);
    1.35 +</script>
    1.36 +</head>
    1.37 +<body>
    1.38 +<div id="in-flow-top"></div>
    1.39 +<div id="abs-pos"></div>
    1.40 +<div id="in-flow-bottom"></div>
    1.41 +</body>
    1.42 +</html>

mercurial