Skip to content

Coverage: serve browser tests with pub so XHR requests have a valid Origin #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
evanweible-wf opened this issue Nov 10, 2015 · 2 comments

Comments

@evanweible-wf
Copy link
Contributor

Currently in the coverage task, browser tests are run by opening an HTML file with content-shell. This works, but means that any XHR request from that file will have an Origin: null header. If the request also sets withCredentials = true and the server responds with the Access-Control-Allow-Origin: * header, the request will fail.

To fix this, browser tests will have to be served by a pub serve process.

@evanweible-wf
Copy link
Contributor Author

The best solution would be for the test package to support coverage since it already runs browser tests like this, but that is probably still a ways off (see dart-lang/test#36).

@evanweible-wf
Copy link
Contributor Author

Fixed by #92

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant