Choose which cross-origin URL to use up front. #3095
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The earliest version of this code, which was seemingly stable, made the
determination of whether to use a local or remote URL cor cross-origin
images up front. Network timeouts from machines that deliberately
aren't connected to the open Internet can't be relied upon as a fallback
mechanism. Change the code back to examine the test's URL and choose
whether to load local or remote images based on that. Also attempt to
make runningOnLocalhost more robust to IPv6 loopback addresses.
Follow-on to #3052 and #3077. See http://crbug.com/1082525 for more
background.
Should fix #3076 conclusively.
Note that #3097 was proposed as an alternative solution for this problem
and may still be considered in the future if this change destabilizes some
browsers' CI systems.