summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qmltests/BLACKLIST6
-rw-r--r--tests/auto/quick/qmltests/data/tst_linkHovered.qml22
2 files changed, 22 insertions, 6 deletions
diff --git a/tests/auto/quick/qmltests/BLACKLIST b/tests/auto/quick/qmltests/BLACKLIST
index d281020df..2673c7eb2 100644
--- a/tests/auto/quick/qmltests/BLACKLIST
+++ b/tests/auto/quick/qmltests/BLACKLIST
@@ -1,9 +1,3 @@
-[DesktopWebEngineViewLinkHovered::test_linkHovered]
-*
-
-[DesktopWebEngineViewLinkHovered::test_linkHoveredDoesntEmitRepeated]
-*
-
[WebViewGeopermission::test_deniedGeolocationByUser]
osx
diff --git a/tests/auto/quick/qmltests/data/tst_linkHovered.qml b/tests/auto/quick/qmltests/data/tst_linkHovered.qml
index b049f07a3..0b99ffa7f 100644
--- a/tests/auto/quick/qmltests/data/tst_linkHovered.qml
+++ b/tests/auto/quick/qmltests/data/tst_linkHovered.qml
@@ -29,6 +29,7 @@
import QtQuick 2.0
import QtTest 1.0
import QtWebEngine 1.2
+import QtWebEngine.testsupport 1.0
TestWebEngineView {
id: webEngineView
@@ -38,6 +39,20 @@ TestWebEngineView {
property string lastUrl
+ testSupport: WebEngineTestSupport {
+ property bool loadVisuallyCommittedSignalEmitted: false
+
+ function waitForLoadVisuallyCommitted() {
+ return _waitFor(function() {
+ return testSupport.loadVisuallyCommittedSignalEmitted;
+ });
+ }
+
+ onLoadVisuallyCommitted: {
+ loadVisuallyCommittedSignalEmitted = true;
+ }
+ }
+
SignalSpy {
id: spy
target: webEngineView
@@ -61,6 +76,7 @@ TestWebEngineView {
}
function init() {
+ webEngineView.testSupport.loadVisuallyCommittedSignalEmitted = false;
webEngineView.lastUrl = ""
spy.clear()
}
@@ -76,6 +92,9 @@ TestWebEngineView {
compare(spy.count, 1)
compare(webEngineView.lastUrl, "")
+ // Wait for the page to be rendered before trying to test based on input events
+ verify(webEngineView.testSupport.waitForLoadVisuallyCommitted());
+
mouseMove(webEngineView, 100, 100)
spy.wait()
compare(spy.count, 2)
@@ -96,6 +115,9 @@ TestWebEngineView {
compare(spy.count, 1)
compare(webEngineView.lastUrl, "")
+ // Wait for the page to be rendered before trying to test based on input events
+ verify(webEngineView.testSupport.waitForLoadVisuallyCommitted());
+
for (var i = 0; i < 100; i += 10)
mouseMove(webEngineView, 100, 100 + i)