void () { ExternalResourceManagerEx manager = ExternalResourceManagerEx.getInstanceEx(); String defaultHtmlDoctype = manager.getDefaultHtmlDoctype(getProject()); manager.setDefaultHtmlDoctype(Html5SchemaProvider.getHtml5SchemaLocation(), getProject()); try { doTest(); } finally { manager.setDefaultHtmlDoctype(defaultHtmlDoctype, getProject()); } }