summaryrefslogtreecommitdiffstats
path: root/tests/auto/quick/qmltests/data/tst_findText.qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/quick/qmltests/data/tst_findText.qml')
-rw-r--r--tests/auto/quick/qmltests/data/tst_findText.qml19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/quick/qmltests/data/tst_findText.qml b/tests/auto/quick/qmltests/data/tst_findText.qml
index 904a8feb2..4761513c1 100644
--- a/tests/auto/quick/qmltests/data/tst_findText.qml
+++ b/tests/auto/quick/qmltests/data/tst_findText.qml
@@ -107,5 +107,24 @@ TestWebEngineView {
tryCompare(webEngineView, "matchCount", 0)
verify(findFailed)
}
+
+ function test_findTextAfterNotFound() {
+ var findFlags = 0
+ webEngineView.url = Qt.resolvedUrl("about:blank")
+ verify(webEngineView.waitForLoadSucceeded())
+
+ webEngineView.clear()
+ webEngineView.findText("hello", findFlags, webEngineView.findTextCallback)
+ tryCompare(webEngineView, "matchCount", 0)
+ verify(findFailed)
+
+ webEngineView.url = Qt.resolvedUrl("test1.html")
+ verify(webEngineView.waitForLoadSucceeded())
+
+ webEngineView.clear()
+ webEngineView.findText("hello", findFlags, webEngineView.findTextCallback)
+ tryCompare(webEngineView, "matchCount", 1)
+ verify(!findFailed)
+ }
}
}