Tests getting and assigning values to document.body On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". PASS successfullyParsed is true TEST COMPLETE PASS frame.contentDocument.body = document.createElement("div") threw exception HierarchyRequestError: Failed to set the 'body' property on 'Document': The new body element is of type 'DIV'. It must be either a 'BODY' or 'FRAMESET' element.. PASS frame.contentDocument.body = document.createElement("frameset") did not throw exception. PASS frame.contentDocument.documentElement.childNodes.length is 2 PASS frame.contentDocument.body = document.createElement("body") did not throw exception. PASS frame.contentDocument.documentElement.childNodes.length is 2 PASS observer.takeRecords().length is 0 PASS frame.contentDocument.body is newBody PASS frame.contentDocument.body is newBody PASS frame.contentDocument.body.tagName is "BODY"