Add /cross-site/ request handler to testserver.py
Adding this handler will make authoring tests which exercise cross-site navigations much easier. This is harder in the current codebase, because testserver runs on a random port each time it is ran which requires boilerplate code in each test that needs it. Instead of computing the real URL in C++ code, just navigate using "/cross-site/hostname/path/and/more" and the server will redirect to the new host. This requires browser tests to map all hosts to localhost, which is done by adding 'host_resolver()->AddRule("*", "127.0.0.1");' to the beginning of the test. BUG=418236 Review URL: https://codereview.chromium.org/612533002 Cr-Commit-Position: refs/heads/master@{#297182}
Showing
Please register or sign in to comment