On 12/17/2013, 11:57 PM, Chris Peterson wrote:
On 12/17/13, 6:49 PM, Ehsan Akhgari wrote:
A few years ago I spent quite some time investigating our intermittent
oranges in the tests living on mozilla-central, and in the process I
ended up fixing a lot of bad patterns in our tests.  Using setTimeout's
like this is definitely one of them.

Can we modify our test framework to poison unsafe global functions? I
can set `Math.random = setInterval = setTimeout = undefined` in the JS
console, but could that work for mochitests?

Interesting that you asked! I was indeed working on that project <https://bugzilla.mozilla.org/show_bug.cgi?id=649012> for setTimeout but I never finished it because there were many tests affected by it. But perhaps this idea is easier to enforce in gaia which has fewer tests now? It would be a huge win if we could do this now so that we don't end up having to chase these kinds of bugs until the eternity.

Cheers,
Ehsan
_______________________________________________
dev-b2g mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to