autox: Add support for creating and querying windows. (issue1292003)

0 views
Skip to first unread message

de...@chromium.org

unread,
Mar 24, 2010, 9:23:48 PM3/24/10
to so...@chromium.org, cma...@chromium.org, chromium-...@chromium.org
Reviewers: sosa, cmasone,

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


so...@chromium.org

unread,
Mar 25, 2010, 12:27:46 PM3/25/10
to de...@chromium.org, cma...@chromium.org, chromium-...@chromium.org, de...@chromium.org
Sorry the review took some time but I had to look up some x func's. Some
optional feedback but o/w lgtm


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

de...@chromium.org

unread,
Mar 25, 2010, 12:41:26 PM3/25/10
to so...@chromium.org, cma...@chromium.org, chromium-...@chromium.org
Thanks. I made a few more changes while you were reviewing, if you don't
mind
taking another quick look.


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.

http://codereview.chromium.org/1292003

so...@chromium.org

unread,
Mar 25, 2010, 12:43:46 PM3/25/10
to de...@chromium.org, cma...@chromium.org, chromium-...@chromium.org, de...@chromium.org
Reply all
Reply to author
Forward
0 new messages