andreasgal/gaia — pull request #326 by jonallengriffin (2012-02-01 02:30:17+00:00)
Title: Get tests working with Marionette

Most of these Gaia tests have been failing under Marionette due to timing issues. The apps on an emulator on our slow test slave are very slow, and code like this:

waitFor(function() {
// something...
}, function() {
let dialerWindow = dialerFrame.contentWindow;
return 'KeyHandler' in dialerWindow;
});

would sometimes allow the test to progress before the DOM was fully generated. I've added some checks to make sure that expected DOM elements are present before continuing, and this change allows all Gaia tests to pass under the Marionette continuous-integration system we've setup at http://brasstacks.mozilla.com/autolog/?tree=b2g&source=autolog. This should allow new breakages to be easily seen.