summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp')
-rw-r--r--tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp b/tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp
index f95c4ab33..1f24928ab 100644
--- a/tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp
+++ b/tests/auto/widgets/qwebenginedownloadrequest/tst_qwebenginedownloadrequest.cpp
@@ -445,7 +445,7 @@ void tst_QWebEngineDownloadRequest::downloadLink()
QCOMPARE(QDir(item->downloadDirectory()).filePath(item->downloadFileName()), suggestedPath);
QCOMPARE(item->savePageFormat(), QWebEngineDownloadRequest::UnknownSaveFormat);
QCOMPARE(item->url(), downloadUrl);
- QCOMPARE(QWebEnginePage::fromDownloadRequest(item), m_page);
+ QCOMPARE(item->page(), m_page);
connect(item, &QWebEngineDownloadRequest::isFinishedChanged, [&, item]() {
QCOMPARE(item->state(), QWebEngineDownloadRequest::DownloadCompleted);
@@ -458,7 +458,7 @@ void tst_QWebEngineDownloadRequest::downloadLink()
QCOMPARE(QDir(item->downloadDirectory()).filePath(item->downloadFileName()), downloadPath);
QCOMPARE(item->savePageFormat(), QWebEngineDownloadRequest::UnknownSaveFormat);
QCOMPARE(item->url(), downloadUrl);
- QCOMPARE(QWebEnginePage::fromDownloadRequest(item), m_page);
+ QCOMPARE(item->page(), m_page);
finishedCount++;
});
@@ -631,7 +631,7 @@ void tst_QWebEngineDownloadRequest::downloadPage()
QCOMPARE(item->mimeType(), QStringLiteral("application/x-mimearchive"));
QCOMPARE(item->savePageFormat(), savePageFormat);
QCOMPARE(item->url(), downloadUrl);
- QCOMPARE(QWebEnginePage::fromDownloadRequest(item), m_page);
+ QCOMPARE(item->page(), m_page);
if (saveWithPageAction) {
QVERIFY(!item->downloadDirectory().isEmpty());
@@ -654,7 +654,7 @@ void tst_QWebEngineDownloadRequest::downloadPage()
QCOMPARE(QDir(item->downloadDirectory()).filePath(item->downloadFileName()), downloadPath);
QCOMPARE(item->savePageFormat(), savePageFormat);
QCOMPARE(item->url(), downloadUrl);
- QCOMPARE(QWebEnginePage::fromDownloadRequest(item), m_page);
+ QCOMPARE(item->page(), m_page);
finishedCount++;
});
@@ -934,7 +934,7 @@ void tst_QWebEngineDownloadRequest::downloadUniqueFilenameWithTimestamp()
QCOMPARE(item->totalBytes(), item->receivedBytes());
QVERIFY(item->receivedBytes() > 0);
QCOMPARE(item->interruptReason(), QWebEngineDownloadRequest::NoReason);
- QCOMPARE(QWebEnginePage::fromDownloadRequest(item), m_page);
+ QCOMPARE(item->page(), m_page);
downloadFinished = true;
downloadedFilePath = QDir(item->downloadDirectory()).filePath(item->downloadFileName());
});
@@ -1030,7 +1030,7 @@ void tst_QWebEngineDownloadRequest::downloadToNonExistentDir()
QCOMPARE(item->totalBytes(), item->receivedBytes());
QVERIFY(item->receivedBytes() > 0);
QCOMPARE(item->interruptReason(), QWebEngineDownloadRequest::NoReason);
- QCOMPARE(QWebEnginePage::fromDownloadRequest(item), m_page);
+ QCOMPARE(item->page(), m_page);
downloadFinished = true;
downloadedFilePath = QDir(item->downloadDirectory()).filePath(item->downloadFileName());
});
@@ -1179,7 +1179,7 @@ void tst_QWebEngineDownloadRequest::downloadToDirectoryWithFileName()
QCOMPARE(item->totalBytes(), item->receivedBytes());
QVERIFY(item->receivedBytes() > 0);
QCOMPARE(item->interruptReason(), QWebEngineDownloadRequest::NoReason);
- QCOMPARE(QWebEnginePage::fromDownloadRequest(item), m_page);
+ QCOMPARE(item->page(), m_page);
downloadFinished = true;
downloadedFilePath = QDir(item->downloadDirectory()).filePath(item->downloadFileName());
downloadedSuggestedFileName = item->suggestedFileName();