• nasko's avatar
    Add /cross-site/ request handler to testserver.py · 14c66460
    nasko authored
    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}
    14c66460
testserver.py 81.7 KB