summaryrefslogtreecommitdiff
path: root/test/monkey_driver.py
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2019-06-06 17:16:23 +0100
committerVincent Sanders <vince@kyllikki.org>2019-06-06 17:17:27 +0100
commitc74c8332acc3e323565281f3f2774bf088a6a882 (patch)
treeb7e5fd4e4d5011a923dc88ccdf39fafcc32d3f7d /test/monkey_driver.py
parenteeeca4b712cd99290348a37f143535c3c33fb116 (diff)
downloadnetsurf-c74c8332acc3e323565281f3f2774bf088a6a882.tar.gz
netsurf-c74c8332acc3e323565281f3f2774bf088a6a882.tar.bz2
allow monkey tests to stop navigation
Diffstat (limited to 'test/monkey_driver.py')
-rwxr-xr-xtest/monkey_driver.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/monkey_driver.py b/test/monkey_driver.py
index 30570942e..16f286a5f 100755
--- a/test/monkey_driver.py
+++ b/test/monkey_driver.py
@@ -235,6 +235,14 @@ def run_test_step_action_navigate(ctx, step):
assert(win is not None)
win.go(step['url'])
+def run_test_step_action_stop(ctx, step):
+ print(get_indent(ctx) + "Action: " + step["action"])
+ assert_browser(ctx)
+ tag = step['window']
+ win = ctx['windows'].get(tag)
+ assert(win is not None)
+ win.stop()
+
def run_test_step_action_sleep_ms(ctx, step):
print(get_indent(ctx) + "Action: " + step["action"])
conds = step['conditions']
@@ -438,6 +446,7 @@ step_handlers = {
"window-new": run_test_step_action_window_new,
"window-close": run_test_step_action_window_close,
"navigate": run_test_step_action_navigate,
+ "stop": run_test_step_action_stop,
"sleep-ms": run_test_step_action_sleep_ms,
"block": run_test_step_action_block,
"repeat": run_test_step_action_repeat,