• karandeepb's avatar
    MacViews: Correct combobox unittests so that they terminate correctly. · eff8bd89
    karandeepb authored
    On MacViews, the tests ComboboxTest.NotifyOnClickWithSpaceKey and
    ComboboxTest.NotifyOnClickWithReturnKey do not terminate currently when run
    individually. This only happens on Mac, because on other platforms the combobox
    dropdown menu is async (non-blocking). However on Mac, a native NSMenu is used
    to show the combobox dropdown, which runs a nested message loop and hence is
    blocking.
    
    To solve, install a TestMenuRunner for all the tests using the ComboboxTest
    fixture. This ensures that an actual menu is not created.
    
    BUG=679980
    TEST= Run out/Default/views_unittests
    --gtest_filter="ComboboxTest.NotifyOnClickWithSpaceKey" on Mac. Ensure that the
    test terminates normally.
    
    Review-Url: https://codereview.chromium.org/2620963002
    Cr-Commit-Position: refs/heads/master@{#443077}
    eff8bd89
combobox_unittest.cc 26.6 KB