summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/css-generated-content/details-before-after-content.html
blob: ccd35a6b0bc221f11cae3f6f4503ef056daf416b (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
<!DOCTYPE html>

<script src="../../resources/js-test.js"></script>

<style>
    details.before:before {
      content: "+";
      display: block;
    }
    details.after:after {
      content: "+";
      display: block;
    }
</style>

<details>
    <summary>Should allow generated content inside details</summary>
</details>

<script>
if (window.testRunner)
    testRunner.dumpAsText();

var details = document.querySelector('details');

function assertHeightChangedWithClassName(className)
{
    oldHeight = details.offsetHeight;
    details.className = className;
    newHeight = details.offsetHeight;
    debug('::' + className);
    shouldBeTrue("newHeight > oldHeight");
    details.className = '';
}

description("Should allow generated content inside details");
assertHeightChangedWithClassName('before');
assertHeightChangedWithClassName('after');
details.remove();
</script>