blob: 824795f80b13c9a2860b8a1830f67393d47a30c2 [file] [log] [blame]
<!doctype html>
<title>Sandboxed document.domain</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script>
test(() => {
assert_throws("SecurityError", () => { document.domain = document.domain });
});
test(() => {
assert_throws("SecurityError", () => { (new Document).domain = document.domain });
});
test(() => {
assert_throws("SecurityError", () => { document.implementation.createHTMLDocument().domain = document.domain });
});
test(() => {
assert_throws("SecurityError", () => { document.implementation.createDocument(null, "").domain = document.domain });
});
test(() => {
assert_throws("SecurityError", () => { document.createElement("template").content.ownerDocument.domain = document.domain });
});
</script>