ait create_window_in_test(this);
     const result = await construct_custom_element_in_parser(this, (document) => another_window.document.close());
     assert_equals(result.exception, null);
 }, 'document.close() of another document must not throw an InvalidStateError when synchronously constructing a custom element');

 promise_test(async function () {
     const another_window = await create_window_in_test(this);
     const result = await construct_custom_element_in_parser(this, (document) => another_win