        });
          customElements.define(inner_element_name,
            class MockCustomElement extends HTMLElement {
              connectedCallback() { reactions.push("inner connected"); }
              disconnectedCallback() { reactions.push("inner disconnected"); }
            });
        const outer = document.createElement(outer_element_name);
        const inner = document.createElement(inner_element_name);
        t.add_cleanup(() => outer.remove());
        outer.append(inner);
        document