summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/compat/webkit-box-vertically-centered.html
blob: 4932274e906172f37ceed65067141817aa1b26ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<!DOCTYPE html>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
#wb {
  display: -webkit-box;
  -webkit-box-align: center;
  -webkit-box-orient: vertical;
}
</style>
<div id="wb">
  <span id="t">text</span>
</div>
<script>
  test(function() {
    var child = document.getElementById("t");
    var webkitBox = document.getElementById("wb");
    // |webkitBox| should be centered, this at least ensures it's not left
    // aligned.
    assert_greater_than(child.offsetLeft, webkitBox.offsetLeft);
  }, "Child in vertically centered webkit-box is centered");
</script>