• Sean Gilhuly's avatar
    Web Tests: Adjust event coordinates for the main frame · 8f3cf620
    Sean Gilhuly authored
    TransformScreenToWidgetCoordinates() assumes that coordinates are given
    in absolute space, but they are sent by EventSender relative to the main
    frame. This caused a number of tests to fail when
    --disable-headless-mode was passed due to the offset caused by the
    window decorations and tool bar. Add this offset into the calculation.
    
    This doesn't work for OOPIF tests because the main frame is a
    WebRemoteFrame object without a corresponding RenderWidget, so the
    offset can't be retrieved in the same way. None of these tests are run
    out of headless mode, so this should be fine. Mark this expectation for
    now.
    
    Bug: 935970
    Change-Id: I255cec584fc91176471861b45ab8ff37aade7b39
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1814838Reviewed-by: default avatarSadrul Chowdhury <sadrul@chromium.org>
    Reviewed-by: default avatarScott Violet <sky@chromium.org>
    Commit-Queue: Sean Gilhuly <sgilhuly@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#715408}
    8f3cf620
web_test_support.cc 12.7 KB