Bug 156063 - Web Automation: Navigation commands should not return until page loads or fails
Summary: Web Automation: Navigation commands should not return until page loads or fails
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: WebKit Local Build
Hardware: All All
: P2 Normal
Assignee: Timothy Hatcher
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2016-03-31 08:07 PDT by Timothy Hatcher
Modified: 2018-02-21 10:49 PST (History)
7 users (show)

See Also:


Attachments
Patch (14.60 KB, patch)
2016-03-31 08:11 PDT, Timothy Hatcher
bburg: review+
timothy: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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