Add many new tests for cross-origin WebSocket usage to check that it functions correctly.
Some existing tests (e.g. frame-length-skip) currently use ws://localhost:8880 - these need to be evaluated for correctness, too.
Created attachment 44287 [details] Add tests for cross-origin WebSocket usage
style-queue ran check-webkit-style on attachment 44287 [details] without any errors.
Both ws://localhost:8880 and ws://127.0.0.1:8880 are cross-origin if the test itself is served from http://127.0.0.1:8000. So, changing one for another doesn't seem to make much sense. I got somewhat confused about how origin-based authentication works for WebSocket - unlike XMLHttpRequest, it doesn't have a "only same origin" legacy, so it doesn't matter which server URL to use.
And now I just realized that the tests are loaded from ws://127.0.0.1:8880, sorry for the noise. Maybe we could change the port for websocket tests to not look that similar to port 8000?
Comment on attachment 44287 [details] Add tests for cross-origin WebSocket usage Looks good, r=me. One general note: it would be nice if parts of _wsh.py scripts' functionality could be shared between tests. We could use URL queries to pass parameters to them. Of course, combining them all into one script should not be a goal, but reducing the number of files necessary for an average test would be good.
Committed r51743: <http://trac.webkit.org/changeset/51743>
(In reply to comment #6) > (From update of attachment 44287 [details]) > Looks good, r=me. Thanks for review! > > One general note: it would be nice if parts of _wsh.py scripts' functionality > could be shared between tests. We could use URL queries to pass parameters to > them. > > Of course, combining them all into one script should not be a goal, but > reducing the number of files necessary for an average test would be good. Agree. I'll create another patch.