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:
parent
0686c96cc5
commit
82fe742ec2
5
engine/src/flutter/tests/layout/margins-expected.txt
Normal file
5
engine/src/flutter/tests/layout/margins-expected.txt
Normal 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.
|
17
engine/src/flutter/tests/layout/margins.sky
Normal file
17
engine/src/flutter/tests/layout/margins.sky
Normal 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>
|
Loading…
x
Reference in New Issue
Block a user