summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2017-03-17 09:35:25 +0100
committerPeter Varga <pvarga@inf.u-szeged.hu>2017-07-19 13:40:42 +0000
commit0feb0436f5d9a1adc401de837e25e523a03d2925 (patch)
treee3f9679ad70de9eeaf3136dd19c08e6e0b70275a /tests
parent17d702f6580b6f4590a3efb4ed7133fdcddd4259 (diff)
Remove tst_QWebEnginePage::scrollToAnchor auto test
The tested QWebEnginePage::scrollToAnchor API can't be added to QtWebEngine for now. Currently, Chromium Content API doesn't support to control page scroll. The corresponding feature can be used by URL fragment identifier (#anchor) or JavaScript API (location.href). Change-Id: Ie9c87758d458858ba677d309a548cdced525557b Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
index 231012c65..393902a9e 100644
--- a/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
+++ b/tests/auto/widgets/qwebenginepage/tst_qwebenginepage.cpp
@@ -184,7 +184,6 @@ private Q_SLOTS:
void baseUrl_data();
void baseUrl();
void scrollPosition();
- void scrollToAnchor();
void scrollbarsOff();
void evaluateWillCauseRepaint();
void setContent_data();
@@ -3514,42 +3513,6 @@ void tst_QWebEnginePage::scrollPosition()
QCOMPARE(y, 29);
}
-void tst_QWebEnginePage::scrollToAnchor()
-{
-#if !defined(QWEBENGINEELEMENT)
- QSKIP("QWEBENGINEELEMENT");
-#else
- QWebEnginePage page;
- page.setViewportSize(QSize(480, 800));
-
- QString html("<html><body><p style=\"margin-bottom: 1500px;\">Hello.</p>"
- "<p><a id=\"foo\">This</a> is an anchor</p>"
- "<p style=\"margin-bottom: 1500px;\"><a id=\"bar\">This</a> is another anchor</p>"
- "</body></html>");
- page.setHtml(html);
- page.setScrollPosition(QPoint(0, 0));
- QCOMPARE(page.scrollPosition().x(), 0);
- QCOMPARE(page.scrollPosition().y(), 0);
-
- QWebEngineElement fooAnchor = page.findFirstElement("a[id=foo]");
-
- page.scrollToAnchor("foo");
- QCOMPARE(page.scrollPosition().y(), fooAnchor.geometry().top());
-
- page.scrollToAnchor("bar");
- page.scrollToAnchor("foo");
- QCOMPARE(page.scrollPosition().y(), fooAnchor.geometry().top());
-
- page.scrollToAnchor("top");
- QCOMPARE(page.scrollPosition().y(), 0);
-
- page.scrollToAnchor("bar");
- page.scrollToAnchor("notexist");
- QVERIFY(page.scrollPosition().y() != 0);
-#endif
-}
-
-
void tst_QWebEnginePage::scrollbarsOff()
{
#if !defined(QWEBENGINEPAGE_EVALUATEJAVASCRIPT)