summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-02-12 19:39:58 +0100
committerLiang Qi <liang.qi@qt.io>2018-02-12 19:39:58 +0100
commit60f2cfe39ab2822bcc3b86453d8b05cc76d56961 (patch)
tree6a5ad24326b48cc965eab4c4af1fcf4b3e2c6097 /tests
parent271e3cd4f23539382a5f9ea4f5a29f500584da5b (diff)
parent9dc8dff7a8f4d58f71d816375d49f8829f06aae5 (diff)
Merge remote-tracking branch 'origin/5.10.1' into 5.11
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"));