[Webkit-unassigned] [Bug 174421] New: Web Automation: evaluateJavaScriptFunction should start the callback timeout after the function is applied

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jul 12 06:38:37 PDT 2017


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

            Bug ID: 174421
           Summary: Web Automation: evaluateJavaScriptFunction should
                    start the callback timeout after the function is
                    applied
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit2
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: cgarcia at igalia.com
                CC: bburg at apple.com, joepeck at webkit.org

This is causing selenium test testShouldNotTimeoutIfScriptCallsbackInsideAZeroTimeout to fail, because JavaScriptTimeout error is generated unexpectedly. When no script timeout is specified, 0 is used by default, which means we do a setTimeout with 0 and then the script does another setTimeout with 0, but ours is dispatched before and reportTimeoutError is called. We should start our timeout after applying the function, and only if the result hasn't been reported yet.

FAIL test/selenium/webdriver/common/executing_async_javascript_tests.py::testShouldNotTimeoutIfScriptCallsbackInsideAZeroTimeout[WebKitGTK]

========================================================================================== FAILURES ==========================================================================================
_____________________________________________________________ testShouldNotTimeoutIfScriptCallsbackInsideAZeroTimeout[WebKitGTK] _____________________________________________________________

driver = <selenium.webdriver.webkitgtk.webdriver.WebDriver (session="0ebfd066-81e2-4b84-9012-23eced4eed4c")>, pages = <conftest.Pages object at 0x7f5b9e19bfd0>

    def testShouldNotTimeoutIfScriptCallsbackInsideAZeroTimeout(driver, pages):
        pages.load("ajaxy_page.html")
        driver.execute_async_script(
            """var callback = arguments[arguments.length - 1];
>           window.setTimeout(function() { callback(123); }, 0)""")

E       TimeoutException: Message:

selenium/webdriver/remote/errorhandler.py:193: TimeoutException

-- 
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/20170712/895df485/attachment.html>


More information about the webkit-unassigned mailing list