• Elly Fong-Jones's avatar
    views: stop using host coordinates in ButtonTest · ece95756
    Elly Fong-Jones authored
    The notion of "host coordinates" comes from Aura, where it roughly
    means "coordinates relative to the Aura root window". This has no
    meaning on macOS, so they get instead mapped to window coordinates,
    which produces a problem: some tests assume that their *contents
    view* is at (0,0) in "host coordinates" (which Aura allows), but on
    macOS, the contents of a window aren't at (0,0) in that window unless
    it's frameless, and windows aren't at (0,0) in the screen - the WM
    won't allow them to be placed there, because they'd underlap the menu
    bar.
    
    To avoid that problem, rewrite these tests in terms of screen coords;
    these work just fine both on Mac and under Aura.
    
    Bug: 708401
    Change-Id: I3cb7db2c957c786c602fce0446d400e0f14f4117
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2118630Reviewed-by: default avatarRobert Liao <robliao@chromium.org>
    Commit-Queue: Elly Fong-Jones <ellyjones@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#753200}
    ece95756
button_unittest.cc 31.7 KB