summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-05-23 19:50:29 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-05-23 19:50:33 +0100
commiteae3756c557e1481f6c4e1be896e5070e63d4b34 (patch)
tree4761f81b2f3e945fad661d5822bc6c1f43ba16c2 /test
parentcf798ba79ae2b518a8775707ac9ccf90709ce949 (diff)
downloadnetsurf-eae3756c557e1481f6c4e1be896e5070e63d4b34.tar.gz
netsurf-eae3756c557e1481f6c4e1be896e5070e63d4b34.tar.bz2
monkey_driver: Unbreak window condition code so timeouts can happen
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'test')
-rwxr-xr-xtest/monkey_driver.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/monkey_driver.py b/test/monkey_driver.py
index 507464049..606530e81 100755
--- a/test/monkey_driver.py
+++ b/test/monkey_driver.py
@@ -173,17 +173,19 @@ def conds_met(ctx, conds):
window = cond['window']
assert status == "complete" or status == "loading" # TODO: Add more status support?
if window == "*all*":
- # all windows must be not throbbing
+ # all windows must be complete, or any still loading
throbbing = False
for win in ctx['windows'].items():
if win[1].throbbing:
throbbing = True
# throbbing and want loading => true
# not throbbing and want complete => true
- return (status == "loading") == throbbing
+ if (status == "loading") == throbbing:
+ return True
else:
win = ctx['windows'][window]
- return win.throbbing == (status == "loading")
+ if win.throbbing == (status == "loading"):
+ return True
else:
raise AssertionError("Unknown condition: {}".format(repr(cond)))