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.5 6.2
Change-Id: I9461f8e816a25c731d6229df15ee88dcc8c4e165
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
(cherry picked from commit 3e71f256d5813ef699a4030f718fee1d1e53bba1)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>