New issue
Advanced search Search tips

Issue 708069 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocking:
issue 604105



Sign in to add a comment

bluetooth: Wait for row to be removed before continuing test.

Project Member Reported by ortuno@chromium.org, Apr 4 2017

Issue description

ItemChooserDialogTest#testSelectAnItemAndRemoveAnotherItem adds three items and then removes the first and last items.

In between it tests that the non-removed item stays selected but it does so before the actual rows are removed. The chooser looks like this throughout the test:

+---------+
|  desc1  |
+---------+
|  desc2  |
+---------+
|  desc3  |
+---------+

The test should wait for the row to actually be removed before proceeding i.e.

// Chooser after three items are added
+---------+
|  desc1  |
+---------+
|  desc2  |
+---------+
|  desc3  |
+---------+

// Chooser in test after first item is removed.
+---------+
|  desc2  |
+---------+
|  desc3  |
+---------+

// Chooser in test after last item is removed.
+---------+
|  desc2  |
+---------+
 
Project Member

Comment 1 by sheriffbot@chromium.org, Apr 4 2018

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: Available (was: Untriaged)
ortuno@, do you mean that we need to wait for the UI to redraw before testing the state? Is there an Android SDK function for that?
I think it's more about the state of the list being updated. IIRC I was trying to test that "desc2" had the correct icon after "desc1" was removed. To retrieve the icon we use `getRowView(Dialog dialog, int position)`, but since we don't wait for the list to be updated, getRowView(dialog, 1), which should retrieve desc2's icon was retrieving desc1's icon. (we use 1-based numbering)
We update the list items themselves synchronously. Does waiting for the icon to change require pumping the UI loop or something?
Right, we update our model of the list synchronously but I don't think we update the views themselves synchronously. Other tests I've seen usually wait on the state of one of the views to change before proceeding e.g. https://cs.chromium.org/chromium/src/chrome/android/javatests/src/org/chromium/chrome/browser/ItemChooserDialogTest.java?l=122

Sign in to add a comment