summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/qwebenginedownloads/tst_qwebenginedownloads.cpp')
-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 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"));