blob: 5e20bea2271ecf57383780b2fbd85ff16c2d9f50 [file] [log] [blame]
<!DOCTYPE html>
<title>This tests that DocumentFragment is constructable</title>
<body>
<script src="../../resources/testharness.js"></script>
<script src="../../resources/testharnessreport.js"></script>
<script>
setup({single_test: true});
assert_equals(new DocumentFragment().ownerDocument, document);
assert_equals(typeof new DocumentFragment, "object");
assert_equals(Object.prototype.toString.call(new DocumentFragment), "[object DocumentFragment]");
assert_true(new DocumentFragment instanceof DocumentFragment);
assert_equals(Object.getPrototypeOf(new DocumentFragment), DocumentFragment.prototype);
var frame = document.createElement('iframe');
document.body.appendChild(frame);
var innerWindow = frame.contentWindow;
var innerDocument = frame.contentDocument;
assert_equals(new innerWindow.DocumentFragment().ownerDocument, innerDocument)
assert_true(new innerWindow.DocumentFragment instanceof innerWindow.DocumentFragment);
assert_equals(Object.getPrototypeOf(new innerWindow.DocumentFragment), innerWindow.DocumentFragment.prototype);
done();
</script>