summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorVincent Sanders <vince@kyllikki.org>2021-02-07 22:57:27 +0000
committerVincent Sanders <vince@kyllikki.org>2021-02-07 22:57:27 +0000
commita091dc3603c18ff3633a206b346891b4381cf323 (patch)
tree3476773e0a566f15af180d3f1407bb3e12fb59cb /test
parentff225194f338519a4856f24b1196ded583ff51af (diff)
downloadnetsurf-a091dc3603c18ff3633a206b346891b4381cf323.tar.gz
netsurf-a091dc3603c18ff3633a206b346891b4381cf323.tar.bz2
allow monkey tests to specify a redraw area for plot-check steps
Diffstat (limited to 'test')
-rwxr-xr-xtest/monkey_driver.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/test/monkey_driver.py b/test/monkey_driver.py
index 606530e81..a6c75463d 100755
--- a/test/monkey_driver.py
+++ b/test/monkey_driver.py
@@ -217,7 +217,7 @@ def run_test_step_action_launch(ctx, step):
ctx['browser'] = DriverBrowser(
monkey_cmd=monkey_cmd,
monkey_env=monkey_env,
- quiet=True,
+ quiet=False,
wrapper=ctx.get("wrapper"))
assert_browser(ctx)
ctx['windows'] = dict()
@@ -436,13 +436,26 @@ def run_test_step_action_plot_check(ctx, step):
print(get_indent(ctx) + "Action: " + step["action"])
assert_browser(ctx)
win = ctx['windows'][step['window']]
+
+ if 'area' in step.keys():
+ if step["area"] == "extent":
+ # ought to capture the extent updates and use that, instead use a
+ # big area and have the browser clip it
+ area=["0","0","1000","1000000"]
+ else:
+ area = [step["area"]]
+ else:
+ area = None
+
+ # get the list of checks
if 'checks' in step.keys():
checks = step['checks']
else:
checks = {}
+
all_text_list = []
bitmaps = []
- for plot in win.redraw():
+ for plot in win.redraw(coords=area):
if plot[0] == 'TEXT':
all_text_list.extend(plot[6:])
if plot[0] == 'BITMAP':