om-element>hello</custom-element>';

    assert_array_equals(element.takeLog().types(), ['constructed']);
    assert_equals(caption.innerHTML, '<custom-element>hello</custom-element>');

    assert_equals(table.caption, null);
    table.caption = caption;
    assert_array_equals(element.takeLog().types(), ['connected']);
}, 'caption on HTMLTableElement must enqueue connectedCallback when inserting a custom element');

test_with_window(function (contentWindow, contentDocument) {
    const element = define_cu