• Xianzhu Wang's avatar
    Reset browser window size before a web test · b1be0f0c
    Xianzhu Wang authored
    Previously RWHV::SetSize(gfx::Size(800, 600)) at the beginning of a web
    test didn't work on Mac if the previous test synchronously set renderer
    window size (which didn't affect browser window size), because the call
    was a no-op due to the early return in the function when it found that
    the new size was the same as the old size. This left some inconsistent
    state caused by the previous synchronous resize persist until we
    changed the window size to another value.
    
    Now to ensure RWHV::SetSize() to reset the previous state, we call it
    twice, first with a different value, then with the desired value.
    
    This reduces number of unexpected flaky tests on mac-rel from about 300
    to about 180.
    
    Bug: 1011191
    Change-Id: I00fe653f5c44639d2a841bb5d4db779be0da6147
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1845479
    Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
    Reviewed-by: default avatarMike West <mkwst@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#704235}
    b1be0f0c
push-block-with-first-line-expected.txt 768 Bytes