Bug 156063

Summary: Web Automation: Navigation commands should not return until page loads or fails
Product: WebKit Reporter: Timothy Hatcher <timothy>
Component: Web InspectorAssignee: Timothy Hatcher <timothy>
Status: RESOLVED FIXED    
Severity: Normal CC: bburg, graouts, joepeck, mattbaker, nvasilyev, timothy, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Local Build   
Hardware: All   
OS: All   
See Also: https://bugs.webkit.org/show_bug.cgi?id=183007
Attachments:
Description Flags
Patch bburg: review+, timothy: commit-queue-

Description Timothy Hatcher 2016-03-31 08:07:37 PDT
We need to block these endpoints on waiting until the page loads.
Comment 1 Radar WebKit Bug Importer 2016-03-31 08:08:21 PDT
<rdar://problem/25464373>
Comment 2 Timothy Hatcher 2016-03-31 08:11:53 PDT
Created attachment 275282 [details]
Patch
Comment 3 BJ Burg 2016-03-31 08:47:34 PDT
Comment on attachment 275282 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=275282&action=review

> Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp:418
> +}

I believe that this should cancel any pending async script evaluations first so that they error out. We can add this later.

> Source/WebKit2/UIProcess/Automation/WebAutomationSession.h:85
> +    void navigationOccuredForPage(const WebPageProxy&);

Please fix spelling: navigationOccurredForPage

> Source/WebKit2/UIProcess/WebPageProxy.cpp:3126
> +        if (auto automationSession = process().processPool().automationSession())

Nit: auto should be auto& or auto* so the type is less mysterious (and so we don't accidentally make a copy in some cases).
Comment 4 Timothy Hatcher 2016-03-31 11:44:55 PDT
Comment on attachment 275282 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=275282&action=review

>> Source/WebKit2/UIProcess/Automation/WebAutomationSession.cpp:418
>> +}
> 
> I believe that this should cancel any pending async script evaluations first so that they error out. We can add this later.

That is already done on the WebProcess side.
Comment 5 Timothy Hatcher 2016-03-31 13:55:22 PDT
https://trac.webkit.org/r198914