blob: 3b446670b678518ecd932bd4e1cdb3b1e042cc3d [file] [log] [blame]
<!DOCTYPE html>
<!--
CrashTests for Imperative Shadow DOM Distribution API.
See https://crbug.com/869308
-->
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<div id="host">
<div id="child1"></div>
</div>
<script>
const host = document.querySelector("#host");
const child1 = document.querySelector("#child1");
const shadow_root = host.attachShadow({ mode: "open", slotting: "manual" });
const slot1 = document.createElement("slot");
const slot2 = document.createElement("slot");
shadow_root.appendChild(slot1);
shadow_root.appendChild(slot2);
test(() => {
slot2.assign([child1]);
slot1.assign([child1]);
slot1.remove();
slot2.remove();
}, "slot.remove after slot\'s removal should not crash");
</script>