Bug 179979

Summary: WebDriver: handle user prompts shown while executing scripts
Product: WebKit Reporter: Carlos Garcia Campos <cgarcia>
Component: WebDriverAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, ews-watchlist, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 179999    
Attachments:
Description Flags
Patch bburg: review+

Carlos Garcia Campos
Reported 2017-11-23 08:20:20 PST
15.2 Executing Script The rules to execute a function body are as follows. The algorithm will return success with the JSON representation of the function’s return value, or an error if the evaluation of the function results in a JavaScript exception being thrown or at any point during its execution an unhandled user prompt appears. If at any point during the algorithm a user prompt appears, the user prompt handler must be invoked. If its return value is an error, it must immediately return with that error and abort all subsequent substeps of this algorithm. https://w3c.github.io/webdriver/webdriver-spec.html#executing-script
Attachments
Patch (10.65 KB, patch)
2017-11-23 08:26 PST, Carlos Garcia Campos
bburg: review+
Carlos Garcia Campos
Comment 1 2017-11-23 08:26:18 PST
Created attachment 327505 [details] Patch I wrote tests for this, I'll upgrade wpt tests as soon as the patch lands. See https://github.com/w3c/web-platform-tests/pull/8413
EWS Watchlist
Comment 2 2017-11-23 08:27:56 PST
Attachment 327505 [details] did not pass style-queue: ERROR: Source/WebDriver/Session.h:130: Extra space before ( in function call [whitespace/parens] [4] ERROR: Source/WebDriver/Session.cpp:194: Extra space before ( in function call [whitespace/parens] [4] Total errors found: 2 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Carlos Garcia Campos
Comment 3 2017-12-01 05:27:55 PST
Ping Brian.
Blaze Burg
Comment 4 2017-12-01 09:59:15 PST
Comment on attachment 327505 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=327505&action=review r=me! > Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:569 > + for (auto id : m_evaluateJavaScriptFunctionCallbacks.keys()) { Nit: s/id/key/g
Carlos Garcia Campos
Comment 5 2017-12-02 07:13:39 PST
Radar WebKit Bug Importer
Comment 6 2017-12-02 07:14:21 PST
Note You need to log in before you can comment on or make changes to this bug.