blob: 9c6ab5469ef4cc307985fbe3853fec233391ac5e (
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
|
<!DOCTYPE html>
<html>
<head>
<style>
/* relative positioning ensures underlying Layer */
.container {
position: relative;
}
.span {
display: boxed-inline;
margin: 2px;
border: solid;
}
</style>
<script src="../resources/shadow-test-driver.js"></script>
<script>
var testFuncs = [];
testFuncs.push(function contentElementInSelectElement(callIfDone) {
document.getElementById('expect-container').innerHTML = "<div><select><div></div></select></div>";
var div = document.createElement('div');
div.appendChild(document.createElement('div'));
document.getElementById('actual-container').appendChild(div);
var sr = div.createShadowRoot();
var select = document.createElement('select');
var content = document.createElement('content');
select.appendChild(content);
sr.appendChild(select);
document.body.offsetWidth; // force style recalc.
callIfDone();
});
</script>
</head>
<body onload="doTest(testFuncs)">
<div id="actual-container" class="container"></div>
<div id="expect-container" class="container"></div>
<pre id="console"></pre>
</body>
</html>
|