summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp b/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp
index 606fe5b12..79a5aa2dc 100644
--- a/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp
+++ b/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp
@@ -472,11 +472,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"));