blob: fa3a3865b4185c1a30834457df561bf445c8eb95 [file] [log] [blame]
<!DOCTYPE html>
<body>
<script src="../../resources/js-test.js"></script>
<script>
description('This tests that DocumentFragment is constructable.');
shouldBe('new DocumentFragment().ownerDocument', 'document');
shouldBe('typeof new DocumentFragment', '"object"');
shouldBe('Object.prototype.toString.call(new DocumentFragment)', '"[object DocumentFragment]"');
shouldBeTrue('new DocumentFragment instanceof DocumentFragment');
shouldBe('Object.getPrototypeOf(new DocumentFragment)', 'DocumentFragment.prototype');
var frame = document.createElement('iframe');
document.body.appendChild(frame);
var innerWindow = frame.contentWindow;
var innerDocument = frame.contentDocument;
shouldBe('new innerWindow.DocumentFragment().ownerDocument', 'innerDocument')
shouldBeTrue('new innerWindow.DocumentFragment instanceof innerWindow.DocumentFragment');
shouldBe('Object.getPrototypeOf(new innerWindow.DocumentFragment)', 'innerWindow.DocumentFragment.prototype');
</script>