If not exists, set global.document object with methods of HTMLDocument to prevent "document is not defined" error. JUST FOR TESTS!!