summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/qwebenginehistory
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-03-20 16:43:59 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-31 16:44:09 +0200
commit3512a6cfe07cb7108485b3e39d586612aa5ed3d8 (patch)
tree3ac7d8f90cd8dce201c52cd3a714ecc536f120ff /tests/auto/widgets/qwebenginehistory
parent40eb43479251385f61253b613e56507f01248e8d (diff)
Implement QWebEngineHistoryItem::lastVisited
Change-Id: I105cb2a0a2479b146e2ab68db6d194ac2ac2d3f9 Reviewed-by: Andras Becsi <andras.becsi@digia.com> Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Diffstat (limited to 'tests/auto/widgets/qwebenginehistory')
-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
*/