summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-text-decor/invalidation/text-decoration-invalidation-solid.html
blob: 4956557aeedc6c3a35ae46e24c85da1313d5634c (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<!DOCTYPE html>
<html class="reftest-wait">
<head>
<title>CSS Text Decoration Test: text-decoration-style: solid invalidation on style change</title>
<link rel="help" href="https://drafts.csswg.org/css-text-decor-4/">
<meta name="assert" content="text-decoration-style: solid should be correctly invalidated on style change.">
<link rel="author" title="Stephen Chenney" href="mailto:schenney@chromium.org">
<link rel="match" href="reference/text-decoration-invalidation-solid-ref.html">
<style>
    div {
        display: block;
        margin-top: 30px;
        margin-bottom: 30px;
        will-change: transform;
    }
    .underline {
        text-decoration-line: underline;
        text-decoration-color: green;
        text-decoration-style: solid;
        text-decoration-thickness: 5px;
    }
    .overline {
        text-decoration-line: overline;
        text-decoration-color: green;
        text-decoration-style: solid;
        text-decoration-thickness: 5px;
    }
    .throughline {
        text-decoration-line: line-through;
        text-decoration-color: green;
        text-decoration-style: solid;
        text-decoration-thickness: 5px;
    }
</style>
<script src="/common/reftest-wait.js"></script>
<script src="/common/rendering-utils.js"></script>
</head>
<body>
<div id="top-underline-div" class="underline">
There should be no sign of an underline when the test completes.
</div>
<div id="bottom-underline-div" >
There should be a 5px green solid underline when the test completes.
</div>
<div id="top-overline-div" class="overline">
There should be no sign of an overline when the test completes.
</div>
<div id="bottom-overline-div" >
There should be a 5px green solid overline when the test completes.
</div>
<div id="top-throughline-div" class="throughline">
There should be no sign of an through-line when the test completes.
</div>
<div id="bottom-throughline-div" >
There should be a 5px green solid through-line when the test completes.
</div>
</body>
<script>
async function runTest() {
  document.getElementById('top-underline-div').classList.remove("underline");
  document.getElementById('bottom-underline-div').classList.add("underline");
  document.getElementById('top-overline-div').classList.remove("overline");
  document.getElementById('bottom-overline-div').classList.add("overline");
  document.getElementById('top-throughline-div').classList.remove("throughline");
  document.getElementById('bottom-throughline-div').classList.add("throughline");
  takeScreenshot();
}
onload = () => {
  waitForAtLeastOneFrame().then(() => { runTest() });
}
</script>
</html>