When we consolidated "all" test functions to use RUN_TEST_FUNC, the cancel() test function was inexplicably overlooked. This patch ports this last test function. Amends 4c00337ccb8e4266fa5a4af4fba40e5b62aba81b, whose commit message contains rationale for this change, but not repeated here. Pick-to: 6.8 6.5 6.2 Change-Id: I9461f8e816a25c731d6229df15ee88dcc8c4e165 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>