summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/quick/qmltests/BLACKLIST3
-rw-r--r--tests/auto/quick/qmltests/data/tst_findText.qml19
-rw-r--r--tests/auto/quick/qmltests/qmltests.pro1
3 files changed, 20 insertions, 3 deletions
diff --git a/tests/auto/quick/qmltests/BLACKLIST b/tests/auto/quick/qmltests/BLACKLIST
index 375d89894..0d48724de 100644
--- a/tests/auto/quick/qmltests/BLACKLIST
+++ b/tests/auto/quick/qmltests/BLACKLIST
@@ -12,6 +12,3 @@ osx
[WebEngineViewLoadUrl::test_urlProperty]
windows
-
-[WebViewFindText::test_findTextManyMatches]
-*
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)
+ }
}
}
diff --git a/tests/auto/quick/qmltests/qmltests.pro b/tests/auto/quick/qmltests/qmltests.pro
index cc5434807..726519db2 100644
--- a/tests/auto/quick/qmltests/qmltests.pro
+++ b/tests/auto/quick/qmltests/qmltests.pro
@@ -45,6 +45,7 @@ OTHER_FILES += \
$$PWD/data/tst_favicon.qml \
$$PWD/data/tst_faviconDownload.qml \
$$PWD/data/tst_filePicker.qml \
+ $$PWD/data/tst_findText.qml \
$$PWD/data/tst_focusOnNavigation.qml \
$$PWD/data/tst_formValidation.qml \
$$PWD/data/tst_geopermission.qml \