[Webkit-unassigned] [Bug 175315] WebDriver: timeout when JavaScript alert is shown in onload handler

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Aug 14 10:04:01 PDT 2017


https://bugs.webkit.org/show_bug.cgi?id=175315

Brian Burg <bburg at apple.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #318038|review?                     |review+
              Flags|                            |

--- Comment #8 from Brian Burg <bburg at apple.com> ---
Comment on attachment 318038
  --> https://bugs.webkit.org/attachment.cgi?id=318038
Updated patch

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

r=me

> Source/WebKit/ChangeLog:14
> +        expects an alert it will just work, otherwise it will fail with UnexpectedAlertOpen error when trying ot handle

Nit: trying to

> Source/WebKit/ChangeLog:29
> +        wewait until the next run loop iteration to give time for the client to show the dialog, then check if page is

Nit: we wait

> Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:415
> +    // we return without waiting since we know it will timeout or sure. We want to check

Nit: for sure

> Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:417
> +    bool shouldTimeoutDueToUnexpectedAlert = pageLoadStrategy.value() == Inspector::Protocol::Automation::PageLoadStrategy::Normal

Nice.

> Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:504
> +        for (auto& process : m_processPool->processes()) {

This could be its own static method to keep the loop simple.

> Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:512
> +            callback->sendSuccess(InspectorObject::create());

Will this return "data null" in the driver endpoint per step 8?

> Source/WebKit/UIProcess/Automation/WebAutomationSession.cpp:532
> +        if (!page->isValid() || !page->pageLoadState().isLoading() || !m_client->isShowingJavaScriptDialogOnPage(*this, page))

What if the session was destroyed? Do we need a guard for that and a protectRef for |this|?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20170814/1d994246/attachment.html>


More information about the webkit-unassigned mailing list