summaryrefslogtreecommitdiff
path: root/Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml')
-rw-r--r--Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml18
1 files changed, 6 insertions, 12 deletions
diff --git a/Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml b/Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml
index 121809316..20d538fbf 100644
--- a/Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml
+++ b/Source/WebKit2/UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml
@@ -1,8 +1,9 @@
import QtQuick 2.0
import QtTest 1.0
import QtWebKit 3.0
+import "../common"
-WebView {
+TestWebView {
id: webView
SignalSpy {
@@ -11,12 +12,6 @@ WebView {
signalName: "iconChanged"
}
- SignalSpy {
- id: loadSpy
- target: webView
- signalName: "loadSucceeded"
- }
-
Image {
id: favicon
source: webView.icon
@@ -29,18 +24,17 @@ WebView {
function init() {
if (webView.icon != '') {
// If this is not the first test, then load a blank page without favicon, restoring the initial state.
- webView.load('about:blank')
+ webView.url = 'about:blank'
spy.wait()
- loadSpy.wait()
+ verify(webView.waitForLoadSucceeded())
}
- loadSpy.clear()
spy.clear()
}
function test_favIconLoad() {
compare(spy.count, 0)
var url = Qt.resolvedUrl("../common/favicon.html")
- webView.load(url)
+ webView.url = url
spy.wait()
compare(spy.count, 1)
compare(favicon.width, 48)
@@ -50,7 +44,7 @@ WebView {
function test_favIconLoadEncodedUrl() {
compare(spy.count, 0)
var url = Qt.resolvedUrl("../common/favicon2.html?favicon=load should work with#whitespace!")
- webView.load(url)
+ webView.url = url
spy.wait()
compare(spy.count, 1)
compare(favicon.width, 16)