diff options
author | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2013-08-19 17:48:19 +0200 |
---|---|---|
committer | Jocelyn Turcotte <jocelyn.turcotte@digia.com> | 2013-08-20 18:16:15 +0200 |
commit | dddfe170077e022f0d428569fe8d5298736a2b68 (patch) | |
tree | 87d6045362ce89da7427b7b385b56a4619aab0f5 /tests/widgets/qwebenginepage | |
parent | 75d9159924fcb2b4c11a43c87e8e62332fdf38fd (diff) |
Implement the basic parts of QWebEngineHistory.
Mark the remaining methods as not implemented to allow enabling most
of the dependent code in the demo browser and in API tests.
Add two new tests to cover cases that might be problematic with the
index-based implementation.
This also renames WebContentsAdapter::navigateHistory to navigateToOffset
in order to avoid confusion with navigateToIndex.
Change-Id: I7c5cb9f5f878e34206fdfe48334a2dc7d9d95a1d
Reviewed-by: Zeno Albisser <zeno.albisser@digia.com>
Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'tests/widgets/qwebenginepage')
-rw-r--r-- | tests/widgets/qwebenginepage/tst_qwebenginepage.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/widgets/qwebenginepage/tst_qwebenginepage.cpp index 0c11c6c16..562afcf55 100644 --- a/tests/widgets/qwebenginepage/tst_qwebenginepage.cpp +++ b/tests/widgets/qwebenginepage/tst_qwebenginepage.cpp @@ -2751,9 +2751,6 @@ public: void tst_QWebEnginePage::errorPageExtension() { -#if !defined(QWEBENGINEHISTORY) - QSKIP("QWEBENGINEHISTORY"); -#else ErrorPage page; m_view->setPage(&page); @@ -2764,7 +2761,9 @@ void tst_QWebEnginePage::errorPageExtension() page.setUrl(QUrl("http://non.existent/url")); QTRY_COMPARE(spyLoadFinished.count(), 2); +#if defined(QWEBENGINEPAGE_TOPLAINTEXT) QCOMPARE(page.toPlainText(), QString("error")); +#endif QCOMPARE(page.history()->count(), 2); QCOMPARE(page.history()->currentItem().url(), QUrl("http://non.existent/url")); QCOMPARE(page.history()->canGoBack(), true); @@ -2784,7 +2783,6 @@ void tst_QWebEnginePage::errorPageExtension() QTRY_COMPARE(page.history()->currentItem().url(), QUrl("data:text/html,foo")); m_view->setPage(0); -#endif } void tst_QWebEnginePage::errorPageExtensionInIFrames() |