[WK2][WTR] WebKitTestRunner UI process should be aware of Custom Policy Delegate
https://bugs.webkit.org/show_bug.cgi?id=95974
Patch by Mikhail Pozdnyakov <mikhail.pozdnyakov@intel.com> on 2012-10-10
Reviewed by Kenneth Rohde Christiansen.
Tools:
Added TestController::decidePolicyForNavigationAction() function as a 'decidePolicyForNavigationAction' WKPagePolicyClient callback
for WTR UI process. WTR bundle client notifies UI process about Custom Policy Delegate via newly added message,
so that TestController is aware of whether Custom Policy Delegate as enabled and
permissive. This data is used then in TestController::decidePolicyForNavigationAction for making policy decision.
* WebKitTestRunner/InjectedBundle/InjectedBundle.cpp:
(WTR::InjectedBundle::setCustomPolicyDelegate):
(WTR):
* WebKitTestRunner/InjectedBundle/InjectedBundle.h:
(InjectedBundle):
* WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::setCustomPolicyDelegate):
* WebKitTestRunner/TestController.cpp:
(WTR::TestController::TestController):
(WTR::TestController::initialize):
(WTR::TestController::resetStateToConsistentValues):
(WTR::TestController::setCustomPolicyDelegate):
(WTR):
(WTR::TestController::decidePolicyForNavigationAction):
* WebKitTestRunner/TestController.h:
(TestController):
* WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveMessageFromInjectedBundle):
LayoutTests:
Unskipped fast/loader/onload-policy-ignore-for-frame.html for WK2.
* platform/wk2/TestExpectations:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@130967 268f45cc-cd09-0410-ab3c-d52691b4dbfc
9 files changed