summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp')
-rw-r--r--tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp b/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp
index cebfee67a..a5cbc6103 100644
--- a/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp
+++ b/tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp
@@ -47,6 +47,7 @@ public Q_SLOTS:
private Q_SLOTS:
void title();
+ void lastVisited();
void count();
void back();
void forward();
@@ -111,6 +112,12 @@ void tst_QWebEngineHistory::title()
QCOMPARE(hist->currentItem().title(), QString("page5"));
}
+void tst_QWebEngineHistory::lastVisited()
+{
+ // Check that the conversion from Chromium's internal time format went well.
+ QVERIFY(qAbs(hist->itemAt(0).lastVisited().secsTo(QDateTime::currentDateTime())) < 60);
+}
+
/**
* Check QWebEngineHistory::count() method
*/