Web Automation: Add Automation protocol commands to handle JavaScript dialogs
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Mar 2016 15:57:49 +0000 (15:57 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 28 Mar 2016 15:57:49 +0000 (15:57 +0000)
commit9f39c17ca13caf0646756dd14056da7599b6bca8
treef04fd80741dec7efa845c8e76ee04b83fc18f1ee
parent181f4a9772ec85ebae1b2ee3ca9512a2a8bdc807
Web Automation: Add Automation protocol commands to handle JavaScript dialogs

https://bugs.webkit.org/show_bug.cgi?id=155888
rdar://problem/25360218

Reviewed by Brian Burg.

* UIProcess/API/APIAutomationSessionClient.h:
(API::AutomationSessionClient::isShowingJavaScriptDialogOnPage): Added.
(API::AutomationSessionClient::dismissCurrentJavaScriptDialogOnPage): Added.
(API::AutomationSessionClient::acceptCurrentJavaScriptDialogOnPage): Added.
(API::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): Added.
(API::AutomationSessionClient::setUserInputForCurrentJavaScriptPromptOnPage): Added.

* UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h:

* UIProcess/Automation/Automation.json: Added new commands.

* UIProcess/Automation/WebAutomationSession.cpp:
(WebKit::WebAutomationSession::isShowingJavaScriptDialog): Added.
(WebKit::WebAutomationSession::dismissCurrentJavaScriptDialog): Added.
(WebKit::WebAutomationSession::acceptCurrentJavaScriptDialog): Added.
(WebKit::WebAutomationSession::messageOfCurrentJavaScriptDialog): Added.
(WebKit::WebAutomationSession::setUserInputForCurrentJavaScriptPrompt): Added.
* UIProcess/Automation/WebAutomationSession.h:

* UIProcess/Cocoa/AutomationSessionClient.h:
* UIProcess/Cocoa/AutomationSessionClient.mm:
(WebKit::AutomationSessionClient::AutomationSessionClient): Added.
(WebKit::AutomationSessionClient::isShowingJavaScriptDialogOnPage): Added.
(WebKit::AutomationSessionClient::dismissCurrentJavaScriptDialogOnPage): Added.
(WebKit::AutomationSessionClient::acceptCurrentJavaScriptDialogOnPage): Added.
(WebKit::AutomationSessionClient::messageOfCurrentJavaScriptDialogOnPage): Added.
(WebKit::AutomationSessionClient::setUserInputForCurrentJavaScriptPromptOnPage): Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@198740 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebKit2/ChangeLog
Source/WebKit2/UIProcess/API/APIAutomationSessionClient.h
Source/WebKit2/UIProcess/API/Cocoa/_WKAutomationSessionDelegate.h
Source/WebKit2/UIProcess/Automation/Automation.json
Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp
Source/WebKit2/UIProcess/Automation/WebAutomationSession.h
Source/WebKit2/UIProcess/Cocoa/AutomationSessionClient.h
Source/WebKit2/UIProcess/Cocoa/AutomationSessionClient.mm