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
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
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.
Ping Brian.
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
Committed r225448: <https://trac.webkit.org/changeset/225448>
<rdar://problem/35814557>