Commit cce649b6 authored by Jüri Valdmann's avatar Jüri Valdmann
Browse files

Stabilize tst_qwebenginedownloads


The waitForRequest/waitForSignal function used by these tests is broken: it
assumes that calling QEventLoop::exit() will immediately exit from the event
loop. In actuality this is not immediate and the event loop may continue to
execute more signals handlers even after exit() has been called. This means that
in e.g. waitForRequest the 'result' variable may be assigned to twice.

Additionally there is a race condition in downloadTwoLinks, where we sometimes
skip the first download. This is not a bug but simply one pending navigation
being aborted in favor of another.

Changes

  - Delete waitForRequest. Define one HTTP request handler per test, using state
    variables to communicate with the main body of the test. Ignore unknown
    requests (including favicon requests). Same for downloadRequested signals.

  - Expand downloadTwoLinks and fix expectations.

  - Add logging to HTTPServer.

  - Unblacklist.

Task-number: QTBUG-66888
Change-Id: I718cac6c4b32a8cc68400fa8ee5b853686c77fcb
Reviewed-by: default avatarPeter Varga <pvarga@inf.u-szeged.hu>
parent ef0bebc8
Showing with 619 additions and 558 deletions
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment