summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/cssom-view/getClientRects-inline-atomic-child.html
blob: f1f6fc5abc679d087d221573456eb9219d1a405c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!DOCTYPE html>
<link rel="help" href="https://drafts.csswg.org/cssom-view-1/#dom-element-getclientrects">
<link rel="author" title="Koji Ishii" href="mailto:kojii@chromium.org">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<style>
inline-block {
  display: inline-block;
  height: 100px;
}
</style>
<body>
  <div>
    <span class="target">
      <inline-block></inline-block>
    </span>
  </div>
  <div>
    <span class="target">
      <span>
        <inline-block></inline-block>
      </span>
    </span>
  </div>
  <div>
    <span class="target">
      <span>
        <span>
          <inline-block></inline-block>
        </span>
      </span>
    </span>
  </div>
<script>
for (let element of document.getElementsByClassName('target')) {
  let rects = element.getClientRects();
  test(() => {
    assert_equals(rects.length, 1);
    for (let rect of rects)
      assert_not_equals(rect.height, 100);
  });
}
</script>
</body>