OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 | 2 |
3 <script src="../js/resources/js-test-pre.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
4 | 4 |
5 <script> | 5 <script> |
6 description('Tests getting and assigning values to document.body'); | 6 description('Tests getting and assigning values to document.body'); |
7 | 7 |
8 onload = function() { | 8 onload = function() { |
9 frame = document.createElement('iframe'); | 9 frame = document.createElement('iframe'); |
10 document.body.appendChild(frame); | 10 document.body.appendChild(frame); |
11 | 11 |
12 shouldThrow('frame.contentDocument.body = document.createElement("div")', "
'HierarchyRequestError: A Node was inserted somewhere it doesn\\'t belong.'"); | 12 shouldThrow('frame.contentDocument.body = document.createElement("div")', "
'HierarchyRequestError: A Node was inserted somewhere it doesn\\'t belong.'"); |
13 shouldNotThrow('frame.contentDocument.body = document.createElement("framese
t")'); | 13 shouldNotThrow('frame.contentDocument.body = document.createElement("framese
t")'); |
(...skipping 16 matching lines...) Expand all Loading... |
30 frame.contentDocument.body = newBody; | 30 frame.contentDocument.body = newBody; |
31 shouldBe("frame.contentDocument.body", "newBody") | 31 shouldBe("frame.contentDocument.body", "newBody") |
32 | 32 |
33 var html = frame.contentDocument.documentElement; | 33 var html = frame.contentDocument.documentElement; |
34 html.appendChild(document.createElement('body')); | 34 html.appendChild(document.createElement('body')); |
35 html.appendChild(document.createElement('frameset')); | 35 html.appendChild(document.createElement('frameset')); |
36 shouldBeEqualToString('frame.contentDocument.body.tagName', 'BODY'); | 36 shouldBeEqualToString('frame.contentDocument.body.tagName', 'BODY'); |
37 }; | 37 }; |
38 </script> | 38 </script> |
39 | 39 |
OLD | NEW |