blob: d9bb1b2d0aafe83b7abe2418b465bc000a3b5fa2 (
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
|
<!DOCTYPE html>
<style>
.before summary:before {
content: "+";
display: block;
}
.after summary:after {
content: "+";
display: block;
}
</style>
<details>
<summary>Should allow generated content inside summary</summary>
</details>
<script>
if (window.testRunner)
testRunner.dumpAsText();
var details = document.querySelector('details');
function assertHeightChangedWithClassName(className)
{
var oldHeight = details.offsetHeight;
details.className = className;
var newHeight = details.offsetHeight;
document.body.appendChild(document.createTextNode(className + ' '));
document.body.appendChild(document.createTextNode(newHeight > oldHeight ? 'PASS' : 'FAIL'));
document.body.appendChild(document.createElement('br'));
details.className = '';
}
onload = function() {
assertHeightChangedWithClassName('before');
assertHeightChangedWithClassName('after');
}
</script>
|