4761cd32218178529b21ba2f421dabd4cd6c10aa
[WebKit.git] / Source / WebKit2 / UIProcess / API / qt / tests / qmltests / WebView / tst_properties.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: "WebViewProperties"
18
19         function test_title() {
20             compare(spy.count, 0)
21             webView.load(Qt.resolvedUrl("../common/test1.html"))
22             spy.wait()
23             compare(webView.title, "Test page 1")
24         }
25
26         function test_url() {
27             compare(spy.count, 1)
28             var testUrl = Qt.resolvedUrl("../common/test1.html")
29             webView.load(testUrl)
30             spy.wait()
31             compare(webView.url, testUrl)
32         }
33     }
34 }