Comment 3 for bug 874690

Revision history for this message
Daniel Manrique (roadmr) wrote :

I looked at the code, and the problem comes from automated tests not hitting the part of the code where the window's title is being set. So it will always reflect the last *manual* test that was run.

checkbox_gtk.py has a show_test method which shows the text for a manual test, this is where we currently update the window's title. However as I mention this only gets used on manual tests. This gets called from the manual_test.py plugin and it's easy to put the test's name because we receive a "test" object as a parameter.

Automated tests basically show the progress indicator (method show_progress_start) which is called from shell_test.py plugin, but unlike manual_test, it sends a preformatted string to display (something like "Running %s...") - this is because the progress indicator can also be used in a non-test context (i.e. launchpad upload progress or data gathering) and so a "test" object isn't always present.

The best solution I could find is to reset the window title to its default, not showing the test name, *after* we complete a manual test. This way, if a manual test is being run, its name gets displayed on the window title. If an automated test is running, the window title is by default "System Testing" and the test's name gets displayed on the new, spiffy in-dialog progress bar. This way there's always information about which test is being run, without duplicating it by showing both in the progress bar and in the window's title. I tested this solution and it's slightly inconsistent UI-wise, but nowhere near as confusing as the described behavior :)