summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/CSS2/floats/remove-float-in-first-line.html
blob: 56f1c87c9c7512a505317758cafbd63dd9f217d6 (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
<!DOCTYPE html>
<title>Removing floats in ::first-line should not crash</title>
<link rel="author" href="kojii@chromium.org">
<link rel="help" href="https://crbug.com/1100900">
<meta name="assert" content="Removing floats in ::first-line should not crash">
<style>
#container {
  display: flow-root;
}
#container::first-line {
  background: orange;
}
#float {
  float: left;
}
</style>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<body>
  <div id="container">text<span id="float"></span></div>
</body>
<script>
test(() => {
  document.body.offsetTop;
  let float = document.getElementById('float');
  float.remove();
  let container = document.getElementById('container');
  container.style.color = 'blue';
}, 'No crash or DCHECK failure');
</script>