summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/qwebenginedownloads/BLACKLIST4
-rw-r--r--tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp7
2 files changed, 10 insertions, 1 deletions
diff --git a/tests/auto/widgets/qwebenginedownloads/BLACKLIST b/tests/auto/widgets/qwebenginedownloads/BLACKLIST
new file mode 100644
index 000000000..f8a97e9e8
--- /dev/null
+++ b/tests/auto/widgets/qwebenginedownloads/BLACKLIST
@@ -0,0 +1,4 @@
+[downloadLink]
+*
+[downloadTwoLinks]
+*
diff --git a/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp b/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp
index 992254206..1d40d91ee 100644
--- a/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp
+++ b/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp
@@ -459,11 +459,16 @@ void tst_QWebEngineDownloads::downloadTwoLinks()
std::unique_ptr<HttpReqRep> file1RR(results.takeFirst());
QVERIFY(file1RR);
QCOMPARE(file1RR->requestMethod(), QByteArrayLiteral("GET"));
- QCOMPARE(file1RR->requestPath(), QByteArrayLiteral("/file1"));
QTRY_COMPARE(requestSpy.count(), 4);
std::unique_ptr<HttpReqRep> file2RR(results.takeFirst());
QVERIFY(file2RR);
QCOMPARE(file2RR->requestMethod(), QByteArrayLiteral("GET"));
+
+ // Handle one request overtaking the other
+ if (file1RR->requestPath() == QByteArrayLiteral("/file2"))
+ std::swap(file1RR, file2RR);
+
+ QCOMPARE(file1RR->requestPath(), QByteArrayLiteral("/file1"));
QCOMPARE(file2RR->requestPath(), QByteArrayLiteral("/file2"));
file1RR->setResponseHeader(QByteArrayLiteral("content-type"), QByteArrayLiteral("text/plain"));