summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJüri Valdmann <juri.valdmann@qt.io>2018-06-05 13:44:03 +0200
committerJüri Valdmann <juri.valdmann@qt.io>2018-06-28 08:28:06 +0000
commit693d4c10c0c6e2faff28f09018422aa612da11da (patch)
tree9b423a2d0b3a4ab943be24ee7a517982b509acea /tests/auto
parentc0d4761f1ee5b09fc908f8d9a58f6fb83e9b79a6 (diff)
Remove race condition workaround from downloadTwoLinks
Not needed with Chromium 67 anymore. Change-Id: I3fd3557181b8140ca15762e8551611cc8c4baed4 Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp24
1 files changed, 4 insertions, 20 deletions
diff --git a/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp b/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp
index 34bfb6bb6..8d965d998 100644
--- a/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp
+++ b/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp
@@ -584,26 +584,10 @@ void tst_QWebEngineDownloads::downloadTwoLinks()
simulateUserAction(QPoint(10, 30), action2);
// Wait for downloads
- if (action1 == action2 && action1 == ClickLink) {
- // With two clicks, sometimes both files get downloaded, sometimes only
- // the second file, depending on the timing. This is expected and
- // follows Chromium's behavior. We check here only that the second file
- // is downloaded correctly (and that we do not crash).
- //
- // The first download may be aborted before or after the HTTP request is
- // made. In the latter case we will have both a file1 and a file2
- // request, but still only one accepted download.
- QTRY_COMPARE(file2RequestCount, 1);
- QTRY_VERIFY(acceptedCount >= 1);
- QTRY_VERIFY(finishedCount >= 1);
- QTRY_COMPARE(m_downloads.count(), 0);
- } else {
- // Otherwise both files should always be downloaded correctly.
- QTRY_COMPARE(file1RequestCount, 1);
- QTRY_COMPARE(file2RequestCount, 1);
- QTRY_COMPARE(acceptedCount, 2);
- QTRY_COMPARE(finishedCount, 2);
- }
+ QTRY_COMPARE(file1RequestCount, 1);
+ QTRY_COMPARE(file2RequestCount, 1);
+ QTRY_COMPARE(acceptedCount, 2);
+ QTRY_COMPARE(finishedCount, 2);
}
void tst_QWebEngineDownloads::downloadPage_data()