haikuwebkit/LayoutTests/css1/units/rounding.html

48 lines
1.0 KiB
HTML
Raw Permalink Normal View History

<html>
<head>
<style type="text/css">
body, div {
margin: 0;
padding: 0;
border: 0;
}
#top, #bottom {
line-height: 1.5;
font-size: 70%;
background:green;
color:white;
width:100%;
}
#top {
padding:.6em 0 .7em;
}
#bottom {
position:absolute;
top:2.8em;
}
</style>
</head>
<body>
<div id="top">no gap below</div>
<div id="bottom">no gap above</div>
<div id="description"></div>
<div id="console"></div>
Change LayoutTests' c* files to use pre and post js files in LayoutTests/resources. https://bugs.webkit.org/show_bug.cgi?id=120986. Rubber stamped by Filip Pizlo. * canvas/philip/tests/2d.composite.globalComposite.html: * compositing/repaint/shrink-layer.html: * css1/units/rounding.html: * css3/calc/color-hsl.html: * css3/calc/color-rgb.html: * css3/calc/font-size-fractional.html: * css3/calc/font-size.html: * css3/calc/font.html: * css3/calc/getComputedStyle-margin-percentage.html: * css3/calc/line-height.html: * css3/calc/margin.html: * css3/calc/table-border-spacing.html: * css3/calc/table-calcs.html: * css3/calc/zoom-with-em.html: * css3/compositing/background-blend-mode-property-parsing.html: * css3/compositing/background-blend-mode-property.html: * css3/compositing/blend-mode-property-parsing-invalid.html: * css3/compositing/blend-mode-property-parsing.html: * css3/compositing/blend-mode-property.html: * css3/compositing/should-have-compositing-layer.html: * css3/filters/custom-with-at-rule-syntax/parsing-at-rule-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-at-rule-valid.html: * css3/filters/custom-with-at-rule-syntax/parsing-custom-function-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-custom-function-valid.html: * css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-valid.html: * css3/filters/custom-with-at-rule-syntax/parsing-mix-property-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-mix-property-valid.html: * css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-valid.html: * css3/filters/custom-with-at-rule-syntax/parsing-src-property-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-src-property-valid.html: * css3/filters/custom/custom-filter-crash-inline-computed-style.html: * css3/filters/custom/custom-filter-mix-bindings.html: * css3/filters/custom/custom-filter-property-computed-style.html: * css3/filters/custom/custom-filter-property-parsing-invalid.html: * css3/filters/custom/custom-filter-property-parsing.html: * css3/filters/custom/effect-custom-disabled.html: * css3/filters/effect-reference-delete-crash.html: * css3/filters/effect-reference-reset-style-delete-crash.html: * css3/filters/filter-property-computed-style.html: * css3/filters/filter-property-parsing-invalid.html: * css3/filters/filter-property-parsing.html: * css3/filters/filter-property.html: * css3/filters/script-tests/TEMPLATE.html: * css3/filters/should-not-have-compositing-layer.html: * css3/flexbox/align-absolute-child.html: * css3/flexbox/css-properties.html: * css3/flexbox/display-flexbox-set-get.html: * css3/flexbox/flex-align-baseline.html: * css3/flexbox/flex-flow-initial.html: * css3/flexbox/flex-longhand-parsing.html: * css3/flexbox/flex-property-parsing.html: * css3/flexbox/flexitem-no-margin-collapsing.html: * css3/flexbox/overflow-keep-scrollpos.html: * css3/font-feature-settings-parsing.html: * css3/supports-cssom.html: * css3/supports-dom-api.html: * css3/supports.html: * css3/unicode-bidi-insolate-parse.html: * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-getStyle.html: * css3/zoom-coords.xhtml: Canonical link: https://commits.webkit.org/138879@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-09-08 02:07:30 +00:00
<script src="../../resources/js-test-pre.js"></script>
<script>
description("This test checks that floating point rounding doesn't cause misalignment. There should be no gap between the divs.");
var divtop = document.getElementById("top").getBoundingClientRect();
var divbottom = document.getElementById("bottom").getBoundingClientRect();
shouldBe('Math.round(divtop.bottom)', '31');
shouldBe('Math.round(divbottom.top)', '31');
</script>
Change LayoutTests' c* files to use pre and post js files in LayoutTests/resources. https://bugs.webkit.org/show_bug.cgi?id=120986. Rubber stamped by Filip Pizlo. * canvas/philip/tests/2d.composite.globalComposite.html: * compositing/repaint/shrink-layer.html: * css1/units/rounding.html: * css3/calc/color-hsl.html: * css3/calc/color-rgb.html: * css3/calc/font-size-fractional.html: * css3/calc/font-size.html: * css3/calc/font.html: * css3/calc/getComputedStyle-margin-percentage.html: * css3/calc/line-height.html: * css3/calc/margin.html: * css3/calc/table-border-spacing.html: * css3/calc/table-calcs.html: * css3/calc/zoom-with-em.html: * css3/compositing/background-blend-mode-property-parsing.html: * css3/compositing/background-blend-mode-property.html: * css3/compositing/blend-mode-property-parsing-invalid.html: * css3/compositing/blend-mode-property-parsing.html: * css3/compositing/blend-mode-property.html: * css3/compositing/should-have-compositing-layer.html: * css3/filters/custom-with-at-rule-syntax/parsing-at-rule-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-at-rule-valid.html: * css3/filters/custom-with-at-rule-syntax/parsing-custom-function-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-custom-function-valid.html: * css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-geometry-property-valid.html: * css3/filters/custom-with-at-rule-syntax/parsing-mix-property-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-mix-property-valid.html: * css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-parameters-property-valid.html: * css3/filters/custom-with-at-rule-syntax/parsing-src-property-invalid.html: * css3/filters/custom-with-at-rule-syntax/parsing-src-property-valid.html: * css3/filters/custom/custom-filter-crash-inline-computed-style.html: * css3/filters/custom/custom-filter-mix-bindings.html: * css3/filters/custom/custom-filter-property-computed-style.html: * css3/filters/custom/custom-filter-property-parsing-invalid.html: * css3/filters/custom/custom-filter-property-parsing.html: * css3/filters/custom/effect-custom-disabled.html: * css3/filters/effect-reference-delete-crash.html: * css3/filters/effect-reference-reset-style-delete-crash.html: * css3/filters/filter-property-computed-style.html: * css3/filters/filter-property-parsing-invalid.html: * css3/filters/filter-property-parsing.html: * css3/filters/filter-property.html: * css3/filters/script-tests/TEMPLATE.html: * css3/filters/should-not-have-compositing-layer.html: * css3/flexbox/align-absolute-child.html: * css3/flexbox/css-properties.html: * css3/flexbox/display-flexbox-set-get.html: * css3/flexbox/flex-align-baseline.html: * css3/flexbox/flex-flow-initial.html: * css3/flexbox/flex-longhand-parsing.html: * css3/flexbox/flex-property-parsing.html: * css3/flexbox/flexitem-no-margin-collapsing.html: * css3/flexbox/overflow-keep-scrollpos.html: * css3/font-feature-settings-parsing.html: * css3/supports-cssom.html: * css3/supports-dom-api.html: * css3/supports.html: * css3/unicode-bidi-insolate-parse.html: * css3/viewport-percentage-lengths/css3-viewport-percentage-lengths-getStyle.html: * css3/zoom-coords.xhtml: Canonical link: https://commits.webkit.org/138879@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@155275 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2013-09-08 02:07:30 +00:00
<script src="../../resources/js-test-post.js"></script>
</body>
</html>