WebKitTestRunner needs support for setHandlesAuthenticationChallenges
authormrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Jan 2013 01:41:17 +0000 (01:41 +0000)
committermrobinson@webkit.org <mrobinson@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 9 Jan 2013 01:41:17 +0000 (01:41 +0000)
commit9e1bb6445c2f5666ea89eb78d12c0e63b40ef015
tree825a375fc9fb9130dd0e82c1256f4f9e632b0fd3
parent3406db8428e9c0c5d6d5e090bd4eddef1111c950
WebKitTestRunner needs support for setHandlesAuthenticationChallenges
https://bugs.webkit.org/show_bug.cgi?id=103653

Reviewed by Anders Carlsson.

Tools:

Implement setHandlesAuthenticationChallenges in the UIProcess by sending credentials
and the enabled boolean to the UIProcess and then implementing the didReceiveAuthenticationChallengeInFrame
client callback.

* WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl: Exposed the new TestRunner
methods to the JavaScript API.
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setHandlesAuthenticationChallenges): Added this callback for the JavaScript API.
(WTR::TestRunner::setAuthenticationUsername): Ditto.
(WTR::TestRunner::setAuthenticationPassword): Ditto.
* WebKitTestRunner/InjectedBundle/TestRunner.h:
(TestRunner): Added new declarations for the above.
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::createWebViewWithOptions): Hook up the new didReceiveSynchronousMessageFromInjectedBundle
callback.
(WTR::TestController::resetStateToConsistentValues): Reset the credentials and enabled boolean between tests.
(WTR::TestController::didReceiveAuthenticationChallengeInFrame): Handle the callback by using
the authentication information passed from the InjectedBundle.
* WebKitTestRunner/TestController.h:
(WTR::TestController::setHandlesAuthenticationChallenges): Added setter to allow TestInvocation
to communicate with the TestController.
(WTR::TestController::setAuthenticationUsername): Ditto.
(WTR::TestController::setAuthenticationPassword): Ditto.
(TestController):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle): Handle the messages sending authentication
information from the InjectedBundle.
(WTR::TestInvocation::outputText): Added this method so that the TestController can output
text to the TestInvocation text output.
* WebKitTestRunner/TestInvocation.h:
(TestInvocation): Added declaration for new method.

LayoutTests:

Unskip authentication tests which are now passing.

* platform/wk2/TestExpectations:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@139140 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/platform/wk2/TestExpectations
Tools/ChangeLog
Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
Tools/WebKitTestRunner/TestController.cpp
Tools/WebKitTestRunner/TestController.h
Tools/WebKitTestRunner/TestInvocation.cpp
Tools/WebKitTestRunner/TestInvocation.h