b46801c2bc13e6fc910f5d6e67107617a47ba1a9
[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
8     SignalSpy {
9         id: spy
10         target: webView
11         signalName: "loadSucceeded"
12     }
13
14     TestCase {
15         name: "WebViewLoadProgress"
16
17         function test_loadProgress() {
18             compare(spy.count, 0)
19             compare(webView.loadProgress, 0)
20             webView.load(Qt.resolvedUrl("../common/test1.html"))
21             compare(webView.loadProgress, 0)
22             spy.wait()
23             compare(webView.loadProgress, 100)
24         }
25     }
26 }