diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2014-03-20 16:43:59 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-31 16:44:09 +0200 |
commit | 3512a6cfe07cb7108485b3e39d586612aa5ed3d8 (patch) | |
tree | 3ac7d8f90cd8dce201c52cd3a714ecc536f120ff /tests | |
parent | 40eb43479251385f61253b613e56507f01248e8d (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')
-rw-r--r-- | tests/auto/widgets/qwebenginehistory/tst_qwebenginehistory.cpp | 7 |
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 */ |