andreasgal/gaia — pull request #800 by davidflanagan (2012-03-15 20:08:39+00:00)
Title: new generator-based test framework and tests

This modifies tests/head.js to define a new generator-based test framework that will, I think, make it significantly easier to write tests.

There are also 3 new tests here that demonstrate the new code in head.js:

browser_a_test_framework.js: is just a tiny stub that makes sure the framework's testApp() function works.
It has the letter a in its name so it gets run first.

browser_all_apps.js: launches and closes each of the installed apps on the homescreen. It doesn't test the apps, just tests that they all launch successfully. This one requests a longer timeout because it takes more than 30 seconds to do all the apps.

browser_dialer_contacts_search2.js: I converted the existing test to use the new framework to show how it would work with this new system.

I've got many of the other tests ported to the new framework as well, but am not pushing those yet.

I'd really like us to adopt this new framework. In part, because my pending cleanup of the window manager and task manager code removes some of the API and events that the existing framework relies on. So I can't complete my cleanup until I've converted all the tests and removed the old framework code from tests/head.js