

    const table = contentDocument.querySelector('table');
    assert_equals(table.tHead, thead);
    const newThead = contentDocument.createElement('thead');
    table.tHead = newThead; // Chrome doesn't support setting to null.
    assert_equals(table.tHead, newThead);
    assert_array_equals(element.takeLog().types(), ['disconnected']);
}, 'tHead on HTMLTableElement must enqueue disconnectedCallback when removing a custom element');

test_with_window(function (contentWindow, contentDocument) {
    const