This tests that various combinations of replaceChild on the document works as specified. On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE". replacing element with element PASS doc.replaceChild(newChild, doc.documentElement) did not throw exception.
replacing element with element in fragment PASS doc.replaceChild(fragment, doc.documentElement); did not throw exception. replacing element with multiple elements in fragment PASS doc.replaceChild(fragment, doc.documentElement); threw exception HierarchyRequestError: Failed to execute 'replaceChild' on 'Node': Only one element on document allowed..