Changed clickAndWaitForNewWindow() to respect the timeout parameter

Also added some tests for this issue.

Bug: 10916102
Change-Id: I5a71e32b9f98a374cfbd578302e0e60b89c8398c
8 files changed