OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <body> | 2 <body> |
3 <script src="../../js/resources/js-test-pre.js"></script> | 3 <script src="../../js/resources/js-test-pre.js"></script> |
4 <script> | 4 <script> |
5 | 5 |
6 description('This tests that Comment is constructable.'); | 6 description('This tests that Comment is constructable.'); |
7 | 7 |
8 shouldBe('new Comment("one").data', '"one"'); | 8 shouldBe('new Comment("one").data', '"one"'); |
9 shouldBe('new Comment().data', '""'); | 9 shouldBe('new Comment().data', '""'); |
10 shouldBe('new Comment("two").ownerDocument', 'document'); | 10 shouldBe('new Comment("two").ownerDocument', 'document'); |
11 | 11 |
12 shouldBe('typeof new Comment', '"object"'); | 12 shouldBe('typeof new Comment', '"object"'); |
13 shouldBe('Object.prototype.toString.call(new Comment)', '"[object Comment]"'); | 13 shouldBe('Object.prototype.toString.call(new Comment)', '"[object Comment]"'); |
14 shouldBeTrue('new Comment instanceof Comment'); | 14 shouldBeTrue('new Comment instanceof Comment'); |
15 shouldBe('Object.getPrototypeOf(new Comment)', 'Comment.prototype'); | 15 shouldBe('Object.getPrototypeOf(new Comment)', 'Comment.prototype'); |
16 | 16 |
17 var frame = document.createElement('iframe'); | 17 var frame = document.createElement('iframe'); |
18 document.body.appendChild(frame); | 18 document.body.appendChild(frame); |
19 var innerWindow = frame.contentWindow; | 19 var innerWindow = frame.contentWindow; |
20 var innerDocument = frame.contentDocument; | 20 var innerDocument = frame.contentDocument; |
21 | 21 |
22 shouldBe('new innerWindow.Comment("three").ownerDocument', 'innerDocument') | 22 shouldBe('new innerWindow.Comment("three").ownerDocument', 'innerDocument') |
23 shouldBeTrue('new innerWindow.Comment instanceof innerWindow.Comment'); | 23 shouldBeTrue('new innerWindow.Comment instanceof innerWindow.Comment'); |
24 shouldBe('Object.getPrototypeOf(new innerWindow.Comment)', 'innerWindow.Comment.
prototype'); | 24 shouldBe('Object.getPrototypeOf(new innerWindow.Comment)', 'innerWindow.Comment.
prototype'); |
25 | 25 |
26 </script> | 26 </script> |
27 <script src="../../js/resources/js-test-post.js"></script> | |
OLD | NEW |