summaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qmltests
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qmltests')
-rw-r--r--tests/auto/quick/qmltests/data/tst_loadHtml.qml20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/auto/quick/qmltests/data/tst_loadHtml.qml b/tests/auto/quick/qmltests/data/tst_loadHtml.qml
index f814822dc..73b6139e2 100644
--- a/tests/auto/quick/qmltests/data/tst_loadHtml.qml
+++ b/tests/auto/quick/qmltests/data/tst_loadHtml.qml
@@ -35,8 +35,15 @@ TestWebEngineView {
width: 200
height: 400
+ SignalSpy {
+ id: urlChangedSpy
+ target: webEngineView
+ signalName: "urlChanged"
+ }
+
TestCase {
name: "WebEngineViewLoadHtml"
+ when: windowShown
function test_loadProgressAfterLoadHtml() {
compare(webEngineView.loadProgress, 0)
@@ -44,5 +51,18 @@ TestWebEngineView {
verify(webEngineView.waitForLoadSucceeded())
compare(webEngineView.loadProgress, 100)
}
+
+ function test_dataURLFragment() {
+ webEngineView.loadHtml("<html><body>" +
+ "<a id='link' href='#anchor'>anchor</a>" +
+ "</body></html>");
+ verify(webEngineView.waitForLoadSucceeded());
+
+ urlChangedSpy.clear();
+ var center = getElementCenter("link");
+ mouseClick(webEngineView, center.x, center.y);
+ urlChangedSpy.wait();
+ compare(webEngineView.url.toString().split("#")[1], "anchor");
+ }
}
}