blob: c6512f95aa5fd5083196e42362a745ce0e0c2d2d [file] [log] [blame]
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script>
function runTest()
{
var targetDetails = document.getElementById("targetDetails");
var clonedDetails = targetDetails.cloneNode(true);
document.body.appendChild(clonedDetails);
var targetSummary = document.getElementById("targetSummary");
var clonedSummary = targetSummary.cloneNode(true);
targetDetails.appendChild(clonedSummary);
if (!window.internals)
return;
// On cloned <details>, marker shadow element should be created
var targetDetailsSummaryShadow = internals.shadowRoot(targetDetails.querySelector("summary"));
targetMarkerPseudoId = internals.shadowPseudoId(targetDetailsSummaryShadow.firstChild);
var clonedDetailsSummaryShadow = internals.shadowRoot(clonedDetails.querySelector("summary"));
clonedMarkerPseudoId = internals.shadowPseudoId(clonedDetailsSummaryShadow.firstChild);
shouldBe("targetMarkerPseudoId", "clonedMarkerPseudoId");
}
</script>
<body onload="runTest()">
<p id="description">Test to clone details and summary elements</p>
<div id="console"></div>
<details id="targetDetails" open>
<summary id="targetSummary"></summary>
</details>
</body>
</html>