Closed ljharb closed 10 years ago
@david-risney, any ideas? Related to #248.
Browsers handle origin for the file Uri scheme differently from one another. It may be we need to skip this test if run over file rather than http(s). I'll need to see if there's a way to run workers over file Uris consistently across browsers.
At least in chrome this is by design and you can't use workers over file Uris: http://stackoverflow.com/questions/7505796/what-is-wrong-with-this-webworker-no-errors-but-console-log-are-not-reached/7505911#7505911 We can add a check for file: to skip the test (like already done if the Worker constructor is missing) so we don't have the false negative test failure.
A feature check for that would definitely be ideal.
Looks like the worker tests don't work properly on
file://
- the test "can import es6-shim" seems to fail in Chrome with the errorError: Failed to construct 'Worker': Script at 'file://localhost/Users/jharband/Dropbox/git/ljharb-es6-shim.git/test/worker-runner.workerjs' cannot be accessed from origin 'null'.