summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorPeter Varga <pvarga@inf.u-szeged.hu>2016-02-28 00:58:58 +0100
committerAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2016-03-08 16:06:25 +0000
commit94254206cd89f57b86f8856436287bbcd5702925 (patch)
tree2b2d247dfce64a23bafa76979794942b03b2857a /tests
parenta4dc92c8802f49462d7bbc7185c6e2aeb9e6a86e (diff)
Fix iconChanged signal in Quick API
Do not emit iconChanged signal twice if icon url does not change. This fix implements the same behavior for icon handling in Quick as in the Widget API. Change-Id: I9fcc27c9cec3cbef74fb0a71026065e359a5cbc3 Task-number: QTBUG-51179 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/quick/qmltests/data/tst_favicon.qml24
1 files changed, 8 insertions, 16 deletions
diff --git a/tests/auto/quick/qmltests/data/tst_favicon.qml b/tests/auto/quick/qmltests/data/tst_favicon.qml
index fab2e9755..052ea3a80 100644
--- a/tests/auto/quick/qmltests/data/tst_favicon.qml
+++ b/tests/auto/quick/qmltests/data/tst_favicon.qml
@@ -79,8 +79,7 @@ TestWebEngineView {
webEngineView.url = url
verify(webEngineView.waitForLoadSucceeded())
- iconChangedSpy.wait()
- compare(iconChangedSpy.count, 1)
+ compare(iconChangedSpy.count, 0)
var iconUrl = webEngineView.icon
compare(iconUrl, Qt.resolvedUrl(""))
@@ -93,8 +92,7 @@ TestWebEngineView {
webEngineView.url = url
verify(webEngineView.waitForLoadSucceeded())
- iconChangedSpy.wait()
- compare(iconChangedSpy.count, 1)
+ compare(iconChangedSpy.count, 0)
var iconUrl = webEngineView.icon
compare(iconUrl, Qt.resolvedUrl(""))
@@ -107,8 +105,7 @@ TestWebEngineView {
webEngineView.url = url
verify(webEngineView.waitForLoadSucceeded())
- iconChangedSpy.wait()
- compare(iconChangedSpy.count, 1)
+ compare(iconChangedSpy.count, 0)
var iconUrl = webEngineView.icon
compare(iconUrl, Qt.resolvedUrl("icons/unavailable.ico"))
@@ -120,14 +117,11 @@ TestWebEngineView {
compare(iconChangedSpy.count, 0)
- var url = Qt.resolvedUrl("http://non.existent/url")
+ var url = Qt.resolvedUrl("invalid://url")
webEngineView.url = url
verify(webEngineView.testSupport.waitForErrorPageLoadSucceeded())
- iconChangedSpy.wait()
- // Icon is reseted at load start.
- // Load is started twice: once for unavailale page then error page
- compare(iconChangedSpy.count, 2)
+ compare(iconChangedSpy.count, 0)
var iconUrl = webEngineView.icon
compare(iconUrl, Qt.resolvedUrl(""))
@@ -138,12 +132,11 @@ TestWebEngineView {
compare(iconChangedSpy.count, 0)
- var url = Qt.resolvedUrl("http://non.existent/url")
+ var url = Qt.resolvedUrl("invalid://url")
webEngineView.url = url
verify(webEngineView.waitForLoadFailed())
- iconChangedSpy.wait()
- compare(iconChangedSpy.count, 1)
+ compare(iconChangedSpy.count, 0)
var iconUrl = webEngineView.icon
compare(iconUrl, Qt.resolvedUrl(""))
@@ -156,8 +149,7 @@ TestWebEngineView {
webEngineView.url = url
verify(webEngineView.waitForLoadSucceeded())
- iconChangedSpy.wait()
- compare(iconChangedSpy.count, 1)
+ compare(iconChangedSpy.count, 0)
var iconUrl = webEngineView.icon
compare(iconUrl, Qt.resolvedUrl(""))