Description:
autox: Add support for creating and querying windows.
The asynchronous stuff makes this a bit tricky -- we wait
for a window to be mapped and exposed before returning
from create_and_map_window() (in case the caller wants to,
say, take a screenshot), and provide an await_condition()
method that will hopefully mask delays between when a test
makes a request and when the change is actually applied by
the window manager.
BUG=none
TEST=tried it with a little test script; it works
Please review this at http://codereview.chromium.org/1292003
Affected files:
M src/platform/autox/autox.py
http://codereview.chromium.org/1292003/diff/1/2
File src/platform/autox/autox.py (right):
http://codereview.chromium.org/1292003/diff/1/2#newcode284
src/platform/autox/autox.py:284: if condition():
Can you compress the first self.sync / condition check into the
beginning of this loop (before you check remaining time) and remove it
from the bottom of the loop?
http://codereview.chromium.org/1292003/diff/1/2
File src/platform/autox/autox.py (right):
http://codereview.chromium.org/1292003/diff/1/2#newcode284
src/platform/autox/autox.py:284: if condition():
On 2010/03/25 16:27:46, sosa wrote:
> Can you compress the first self.sync / condition check into the
beginning of
> this loop (before you check remaining time) and remove it from the
bottom of the
> loop?
Good suggestion; I've restructured this.