996b8853ac807ca6ec166a5daa500e1e07c92dc7
[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
8     SignalSpy {
9         id: spy
10         target: webView
11         signalName: "loadSucceeded"
12     }
13
14     TestCase {
15         name: "WebViewProperties"
16
17         function test_title() {
18             compare(spy.count, 0)
19             webView.load(Qt.resolvedUrl("../common/test1.html"))
20             spy.wait()
21             compare(webView.title, "Test page 1")
22         }
23
24         function test_url() {
25             compare(spy.count, 1)
26             var testUrl = Qt.resolvedUrl("../common/test1.html")
27             webView.load(testUrl)
28             spy.wait()
29             compare(webView.url, testUrl)
30         }
31     }
32 }