Add the check layout framework for tests.

Also add a test for margins.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/699113002
This commit is contained in:
Ojan Vafai 2014-11-03 20:46:32 -08:00
parent 0686c96cc5
commit 82fe742ec2
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,5 @@
FAIL:
<div class="child" data-total-y="10" style="background-color: salmon">
Expected 10 for clientTop+offsetTop, but got 0, clientTop: 0, + offsetTop: 0.
<div class="child" data-total-y="50" style="background-color: papayawhip">
Expected 50 for clientTop+offsetTop, but got 40, clientTop: 0, + offsetTop: 40.

View File

@ -0,0 +1,17 @@
<sky>
<import src="../resources/check-layout.sky" as="checkLayout" />
<style>
.child {
margin: 10px;
height: 30px;
}
</style>
<div class="root" data-expected-height="70" data-total-y="10" style="background-color: pink">
<div class="child" data-total-y="10" style="background-color: salmon"></div>
<div class="child" data-total-y="50" style="background-color: papayawhip"></div>
</div>
<script>
checkLayout('.root');
</script>
</sky>