Remove test dependencies on DOM.