Gitweb links: ...log http://git.netsurf-browser.org/netsurf.git/shortlog/a091dc3603c18ff3633a206b346891b4381cf323 ...commit http://git.netsurf-browser.org/netsurf.git/commit/a091dc3603c18ff3633a206b346891b4381cf323 ...tree http://git.netsurf-browser.org/netsurf.git/tree/a091dc3603c18ff3633a206b346891b4381cf323
The branch, master has been updated via a091dc3603c18ff3633a206b346891b4381cf323 (commit) from ff225194f338519a4856f24b1196ded583ff51af (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commitdiff http://git.netsurf-browser.org/netsurf.git/commit/?id=a091dc3603c18ff3633a206b346891b4381cf323 commit a091dc3603c18ff3633a206b346891b4381cf323 Author: Vincent Sanders <vi...@kyllikki.org> Commit: Vincent Sanders <vi...@kyllikki.org> allow monkey tests to specify a redraw area for plot-check steps diff --git a/docs/integration-testing.md b/docs/integration-testing.md index da93343..03b4130 100644 --- a/docs/integration-testing.md +++ b/docs/integration-testing.md @@ -400,9 +400,14 @@ The window to be rendered is identified with the `window` key, the value of this must be a previously created window identifier or an assert will occur. +The `area` key allows control of the area to be redraw. The parameters are on two forms: + + * A sequence of four numbers in the form `x0 y0 x1 y1` + * The keyword extent which attempt to plot the entire extent of the canvas + An optional list of checks may be specified with the `checks` key. If any check is not satisfied an assert will occur and the test will -fail. +fail. Multiple checks can be specified and all most pass successfully. The checks available are: @@ -416,8 +421,10 @@ The checks available are: - action: plot-check window: win1 + area: extent checks: - text-contains: NetSurf + - text-contains: Browser - text-not-contains: Chrome - bitmap-count: 1 diff --git a/test/monkey_driver.py b/test/monkey_driver.py index 606530e..a6c7546 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': ----------------------------------------------------------------------- Summary of changes: docs/integration-testing.md | 9 ++++++++- test/monkey_driver.py | 17 +++++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/docs/integration-testing.md b/docs/integration-testing.md index da93343..03b4130 100644 --- a/docs/integration-testing.md +++ b/docs/integration-testing.md @@ -400,9 +400,14 @@ The window to be rendered is identified with the `window` key, the value of this must be a previously created window identifier or an assert will occur. +The `area` key allows control of the area to be redraw. The parameters are on two forms: + + * A sequence of four numbers in the form `x0 y0 x1 y1` + * The keyword extent which attempt to plot the entire extent of the canvas + An optional list of checks may be specified with the `checks` key. If any check is not satisfied an assert will occur and the test will -fail. +fail. Multiple checks can be specified and all most pass successfully. The checks available are: @@ -416,8 +421,10 @@ The checks available are: - action: plot-check window: win1 + area: extent checks: - text-contains: NetSurf + - text-contains: Browser - text-not-contains: Chrome - bitmap-count: 1 diff --git a/test/monkey_driver.py b/test/monkey_driver.py index 606530e..a6c7546 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': -- NetSurf Browser _______________________________________________ netsurf-commits mailing list -- netsurf-commits@netsurf-browser.org To unsubscribe send an email to netsurf-commits-le...@netsurf-browser.org