Created attachment 269696 [details]
WebKitTestRunner does not clear cached credentials between test runs.
* STEPS TO REPRODUCE
The following steps assume you have a build of WebKit.
1. Apply the attached diff to the top-level WebKit checkout, LayoutTestToDemonstrateIssued.diff.
2. In the terminal, inside the top-level WebKit checkout directory, run: Tools/Scripts/run-webkit-tests --no-retry-failures --child-processes 1 http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html http/tests/loading/basic-auth-resend-wrong-credentials.html
Then the test LayoutTests/http/tests/loading/basic-auth-resend-wrong-credentials.html will fail because it uses the credentials set in LayoutTests/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html, (username, password) = (webkit, rocks), when accessing the protected resource <ttp://127.0.0.1:8000/loading/resources/test2/protected-resource.php>.
Notice that both LayoutTests/http/tests/loading/basic-auth-load-URL-with-consecutive-slashes.html and LayoutTests/http/tests/loading/basic-auth-resend-wrong-credentials.html access a protected resource in the same protection space, <http://127.0.0.1:8000/resources>.
Created attachment 269756 [details]
Comment on attachment 269756 [details]
Mostly good, except it only sends the message to the NetworkProcess. I think we still need it sent to all WebProcesses, as well, since we still do some networking in the WebProcesses.
Created attachment 269757 [details]
Updated patch to send a message to all web processes to switch to a new testing network session in addition to sending a message to the network process.
Committed r195543: <http://trac.webkit.org/changeset/195543>
This caused a pretty serious performance regression on tests, so creating a whole new session looks like too large of a hammer, unfortunately :(
(In reply to comment #6)
> This caused a pretty serious performance regression on tests, so creating a
> whole new session looks like too large of a hammer, unfortunately :(
Will rollout <http://trac.webkit.org/changeset/195543>.
It should be sufficient to clear the credential cache directly.
Re-opened since this is blocked by bug 153451
Created attachment 269825 [details]
Committed r195589: <http://trac.webkit.org/changeset/195589>