MozMill upgrade incoming, waitForEval users beware

Siddharth Agarwal sagarwal at mozilla.com
Fri Jun 10 17:19:17 UTC 2011


On 07-06-2011 17:33, Siddharth Agarwal wrote:
> Going forward, I think the best practice is to
> - use utils.waitFor [4] instead of controller.waitForEval...

I have a patch in [1] that switches over all uses of waitForEval to 
utils.waitFor.

> - pass in a helpful message as the second argument to waitFor, 
> wherever necessary.

... and if you need to do something more complicated than a simple 
string, then you'll be able to catch the exception based on whether it 
is a utils.TimeoutError, e.g. [2]. Note that this can't be done with the 
current version of mozmill on pypi (1.5.4b2), but 1.5.4 final should 
have TimeoutError.

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=662960
[2] 
https://bugzilla.mozilla.org/attachment.cgi?id=538442&action=diff#a/mail/test/mozmill/shared-modules/test-content-tab-helpers.js_sec5



More information about the tb-planning mailing list