gecko-dev/browser/devtools/storage/test
Brian Birtles 76a87ac42a Bug 927349 part 20 - Update selectTreeItem to wait for tree expansion animations to finish; r=bgrins
Currently selectTreeItem, as used by various devtools storage panel tests,
expands the tree then clicks items. However, it fails to account for the fact
that expansion animations may mean that the item that should be selected is not
yet able to be clicked. It currently happens to be lucky enough that typically
the animation is short enough that the item in question will be click-able in
time (since click() spins the event loop using executeSoon there is some time
for the animation to play).

If we make animations wait until their first frame has rendered before
beginning the chance that the tree item will become clickable in time is
reduced. This patch works around that by looking for animating branches
amongst the ancestors of the item to be selected. If one is found it waits for
the animation to end.

Unfortunately this ties the tests to the tree widget styles somewhat (in
particular the test looks for specified values of max-height).
However, these changes only delay the execution of the test so, if these styles
were to change, it is only likely that these tests would fail (and hence need to
be updated) than to mask a genuine bug. Until the Web Animations API is
available by default it is difficult to test if animations are running so this
seems like the best we can do for now.
2014-12-22 09:35:42 +09:00
..
browser_storage_basic.js
browser_storage_dynamic_updates.js
browser_storage_sidebar.js
browser_storage_values.js
browser.ini
head.js
moz.build
storage-complex-values.html
storage-listings.html
storage-secured-iframe.html
storage-unsecured-iframe.html
storage-updates.html