summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2017-02-01 11:34:27 +0100
committerPeter Varga <pvarga@inf.u-szeged.hu>2017-04-05 14:48:35 +0000
commit6252f0231f85e5f4e6b887a6814d4968acae13bd (patch)
tree86d552557ee3e37057d1b1acac238af846ec78ea
parent5bf0846938574020ab6684a471560c5f15009593 (diff)
Yet another speculative fix of linkHovered QML tests
When the test moves the mouse cursor out of the link area it positions the cursor above an iframe. We should not expect linkHovered signal above an iframe until its load is succeeded. Since we don't have API to test iframes' loading state, remove the iframe from the test. Moreover, increase signal timeout values to 12sec as it is used in other tests too since the 55-based chromium update. Task-number: QTBUG-55870 Change-Id: Id47494ac41a9d34f8a5bf4804fc5c157868cf923 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
-rw-r--r--tests/auto/quick/qmltests/BLACKLIST6
-rw-r--r--tests/auto/quick/qmltests/data/test-iframe.html9
-rw-r--r--tests/auto/quick/qmltests/data/test2.html3
-rw-r--r--tests/auto/quick/qmltests/data/tst_linkHovered.qml8
-rw-r--r--tests/auto/quick/qmltests/data/tst_navigationRequested.qml10
-rw-r--r--tests/auto/quick/qmltests/qmltests.pro1
6 files changed, 19 insertions, 18 deletions
diff --git a/tests/auto/quick/qmltests/BLACKLIST b/tests/auto/quick/qmltests/BLACKLIST
index 19d75dfb7..b7cd7042e 100644
--- a/tests/auto/quick/qmltests/BLACKLIST
+++ b/tests/auto/quick/qmltests/BLACKLIST
@@ -5,12 +5,6 @@ osx
[WebViewGeopermission::test_geoPermissionRequest]
osx
-[DesktopWebEngineViewLinkHovered::test_linkHovered]
-linux
-
-[DesktopWebEngineViewLinkHovered::test_linkHoveredDoesntEmitRepeated]
-linux
-
[WebEngineViewSingleFileUpload::test_acceptDirectory]
*
diff --git a/tests/auto/quick/qmltests/data/test-iframe.html b/tests/auto/quick/qmltests/data/test-iframe.html
new file mode 100644
index 000000000..710c4539a
--- /dev/null
+++ b/tests/auto/quick/qmltests/data/test-iframe.html
@@ -0,0 +1,9 @@
+<html>
+<head><title>Test page with huge link area and iframe</title></head>
+<body>
+<a title="A title" href="test1.html"><img width=200 height=200></a>
+<div>
+ <iframe src="test1.html"></iframe>
+</div>
+</body>
+</html>
diff --git a/tests/auto/quick/qmltests/data/test2.html b/tests/auto/quick/qmltests/data/test2.html
index 8e20d7e9e..629c2a063 100644
--- a/tests/auto/quick/qmltests/data/test2.html
+++ b/tests/auto/quick/qmltests/data/test2.html
@@ -2,8 +2,5 @@
<head><title>Test page with huge link area</title></head>
<body>
<a title="A title" href="test1.html"><img width=200 height=200></a>
-<div>
- <iframe src="test1.html"></iframe>
-</div>
</body>
</html>
diff --git a/tests/auto/quick/qmltests/data/tst_linkHovered.qml b/tests/auto/quick/qmltests/data/tst_linkHovered.qml
index 636d14335..d632452fe 100644
--- a/tests/auto/quick/qmltests/data/tst_linkHovered.qml
+++ b/tests/auto/quick/qmltests/data/tst_linkHovered.qml
@@ -90,11 +90,11 @@ TestWebEngineView {
loadVisuallyCommittedSpy.wait();
mouseMove(webEngineView, 100, 100)
- linkHoveredSpy.wait(10000);
+ linkHoveredSpy.wait(12000);
compare(linkHoveredSpy.count, 2);
compare(webEngineView.lastUrl, Qt.resolvedUrl("test1.html"))
mouseMove(webEngineView, 100, 300)
- linkHoveredSpy.wait(10000);
+ linkHoveredSpy.wait(12000);
compare(linkHoveredSpy.count, 3);
compare(webEngineView.lastUrl, "")
}
@@ -115,14 +115,14 @@ TestWebEngineView {
for (var i = 0; i < 100; i += 10)
mouseMove(webEngineView, 100, 100 + i)
- linkHoveredSpy.wait(10000);
+ linkHoveredSpy.wait(12000);
compare(linkHoveredSpy.count, 2);
compare(webEngineView.lastUrl, Qt.resolvedUrl("test1.html"))
for (var i = 0; i < 100; i += 10)
mouseMove(webEngineView, 100, 300 + i)
- linkHoveredSpy.wait(10000);
+ linkHoveredSpy.wait(12000);
compare(linkHoveredSpy.count, 3);
compare(webEngineView.lastUrl, "")
}
diff --git a/tests/auto/quick/qmltests/data/tst_navigationRequested.qml b/tests/auto/quick/qmltests/data/tst_navigationRequested.qml
index b1c94e601..96128574e 100644
--- a/tests/auto/quick/qmltests/data/tst_navigationRequested.qml
+++ b/tests/auto/quick/qmltests/data/tst_navigationRequested.qml
@@ -92,9 +92,9 @@ TestWebEngineView {
function test_navigationRequested() {
// Test if we get notified about main frame and iframe loads
compare(navigationSpy.count, 0)
- webEngineView.url = Qt.resolvedUrl("test2.html")
+ webEngineView.url = Qt.resolvedUrl("test-iframe.html")
navigationSpy.wait()
- compare(attributes.mainUrl, Qt.resolvedUrl("test2.html"))
+ compare(attributes.mainUrl, Qt.resolvedUrl("test-iframe.html"))
navigationSpy.wait()
compare(attributes.iframeUrl, Qt.resolvedUrl("test1.html"))
compare(navigationSpy.count, 2)
@@ -111,7 +111,7 @@ TestWebEngineView {
function test_ignoreLinkClickedRequest() {
// Test if we can ignore clicked link requests
compare(navigationSpy.count, 0)
- webEngineView.url = Qt.resolvedUrl("test2.html")
+ webEngineView.url = Qt.resolvedUrl("test-iframe.html")
verify(webEngineView.waitForLoadSucceeded())
shouldIgnoreLinkClicks = true
@@ -129,9 +129,9 @@ TestWebEngineView {
function test_ignoreSubFrameRequest() {
// Test if we can ignore sub frame requests
shouldIgnoreSubFrameRequests = true
- webEngineView.url = Qt.resolvedUrl("test2.html")
+ webEngineView.url = Qt.resolvedUrl("test-iframe.html")
tryCompare(navigationSpy, "count", 2)
- compare(attributes.mainUrl, Qt.resolvedUrl("test2.html"))
+ compare(attributes.mainUrl, Qt.resolvedUrl("test-iframe.html"))
compare(attributes.iframeUrl, Qt.resolvedUrl("test1.html"))
// We ignored the sub frame request, so
// the main frame load should still succeed.
diff --git a/tests/auto/quick/qmltests/qmltests.pro b/tests/auto/quick/qmltests/qmltests.pro
index 60c11addc..40fba4512 100644
--- a/tests/auto/quick/qmltests/qmltests.pro
+++ b/tests/auto/quick/qmltests/qmltests.pro
@@ -38,6 +38,7 @@ OTHER_FILES += \
$$PWD/data/test2.html \
$$PWD/data/test3.html \
$$PWD/data/test4.html \
+ $$PWD/data/test-iframe.html \
$$PWD/data/keyboardModifierMapping.html \
$$PWD/data/keyboardEvents.html \
$$PWD/data/titleupdate.js \