a51d6f69f065d0de7dd702941c8cbb66c8c6e619
[WebKit.git] / Source / WebKit2 / UIProcess / API / qt / tests / qmltests / WebView / tst_loadProgress.qml
1 import QtQuick 2.0
2 import QtTest 1.0
3 import QtWebKit 3.0
4
5 WebView {
6     id: webView
7     width: 400
8     height: 300
9
10     SignalSpy {
11         id: spy
12         target: webView
13         signalName: "loadSucceeded"
14     }
15
16     TestCase {
17         name: "WebViewLoadProgress"
18
19         function test_loadProgress() {
20             compare(spy.count, 0)
21             compare(webView.loadProgress, 0)
22             webView.load(Qt.resolvedUrl("../common/test1.html"))
23             compare(webView.loadProgress, 0)
24             spy.wait()
25             compare(webView.loadProgress, 100)
26         }
27     }
28 }