3 <script src=
"../../../resources/js-test.js"></script>
6 description('This tests that DocumentFragment is constructable.');
8 shouldBe('new DocumentFragment().ownerDocument', 'document');
10 shouldBe('typeof new DocumentFragment', '"object"');
11 shouldBe('Object.prototype.toString.call(new DocumentFragment)', '"[object DocumentFragment]"');
12 shouldBeTrue('new DocumentFragment instanceof DocumentFragment');
13 shouldBe('Object.getPrototypeOf(new DocumentFragment)', 'DocumentFragment.prototype');
15 var frame
= document
.createElement('iframe');
16 document
.body
.appendChild(frame
);
17 var innerWindow
= frame
.contentWindow
;
18 var innerDocument
= frame
.contentDocument
;
20 shouldBe('new innerWindow.DocumentFragment().ownerDocument', 'innerDocument')
21 shouldBeTrue('new innerWindow.DocumentFragment instanceof innerWindow.DocumentFragment');
22 shouldBe('Object.getPrototypeOf(new innerWindow.DocumentFragment)', 'innerWindow.DocumentFragment.prototype');