Restored check on window.document for the web-worker, to safe-guard accidental includes outside of web-workers.

Removed the test-case from the web-test-runner, and the supporting code that almost made it work.