New issue
Advanced search Search tips

Issue 679980 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

MacViews: Combobox tests block and do not terminate.

Project Member Reported by karandeepb@chromium.org, Jan 11 2017

Issue description

OS: Mac

What steps will reproduce the problem?
(1) Build views_unittests 
(2) Run out/Default/views_unittests --gtest_filter="ComboboxTest.NotifyOnClickWithSpaceKey" and  out/Default/views_unittests --gtest_filter="ComboboxTest.NotifyOnClickWithReturnKey"

What is the expected result?
Both tests pass.

What happens instead?
When run individually, both tests show the combobox menu and block.

Please use labels and text to provide additional information.


For graphics-related bugs, please copy/paste the contents of the about:gpu
page at the end of this report.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jan 12 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/eff8bd896afe40d5d2646857939ed03b76ca3f12

commit eff8bd896afe40d5d2646857939ed03b76ca3f12
Author: karandeepb <karandeepb@chromium.org>
Date: Thu Jan 12 00:22:45 2017

MacViews: Correct combobox unittests so that they terminate correctly.

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}

[modify] https://crrev.com/eff8bd896afe40d5d2646857939ed03b76ca3f12/ui/views/controls/combobox/combobox_unittest.cc

Status: Fixed (was: Started)

Sign in to add a comment