Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
Add some tests for no-cors and navigate requests for Blob URLs. #9320
referenced this pull request
Jan 31, 2018
Started: 2018-02-08 21:47:30
Browser: "Chrome Dev" (failures allowed)
Any suggestions on how to make these tests less flaky are welcome... not sure how to reliable detect cross-origin loading failure, other than the timeout on loading success I'm currently doing (and as it shows, apparently a 1 second timeout isn't long enough to not be flaky...)
annevk left a comment
Tests look great, though I wonder if they should be in the /fetch directory somewhere instead, given that we'll probably define it there?
I'm not sure how to deal with the flaky behavior, I guess you can expand the timeout to 2s and see if that goes better?
I'm not sure. We could indeed try to split the various blob URL loading related tests between FileAPI, fetch, url and XHR directories, but it isn't always clear where a test belongs, so it seemed easiest to just keep all the blob URL related tests together. But yeah, you're right that the spec changes to make these tests match the spec would be in the fetch spec.
I increased the timeout and changed the tests to async_test rather than promise_test to at least let the timeouts of all the tests overlap... Lets see how that goes.
I usually prefer promise_test over async_test as they are run sequentially one after the other.
I don't have a good answer for the iframe loading issue.
As of where it should be, fetch API already has some blob tests, as well as service worker.