function() { iframe.contentDocument.open(); });
        }));
      }, "same-origin-domain iframe");

      test(() => {
        assert_throws_dom("SecurityError", () => { (new Document).domain = document.domain });
        assert_throws_dom("SecurityError", () => { document.implementation.createHTMLDocument().domain = document.domain });
        assert_throws_dom("SecurityError", () => { document.implementation.createDocument(null, "").domain = document.domain });
      }, "failed setting of document.domain