summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-11-06 00:57:33 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-11-06 00:57:33 (GMT)
commitd79eb9b3e824b2d61ae4412889d0f8a0eb8e688c (patch)
treeef06d1fb685182106abb48ed16763b5ec597c584 /tests
parent9c840402fe57c43ab03c671a8ca6539e97cf1268 (diff)
downloadQt-d79eb9b3e824b2d61ae4412889d0f8a0eb8e688c.zip
Qt-d79eb9b3e824b2d61ae4412889d0f8a0eb8e688c.tar.gz
Qt-d79eb9b3e824b2d61ae4412889d0f8a0eb8e688c.tar.bz2
set html property
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/declarative/qfxwebview/data/sethtml.qml5
-rw-r--r--tests/auto/declarative/qfxwebview/tst_qfxwebview.cpp14
2 files changed, 17 insertions, 2 deletions
diff --git a/tests/auto/declarative/qfxwebview/data/sethtml.qml b/tests/auto/declarative/qfxwebview/data/sethtml.qml
new file mode 100644
index 0000000..063b5a8
--- /dev/null
+++ b/tests/auto/declarative/qfxwebview/data/sethtml.qml
@@ -0,0 +1,5 @@
+import Qt 4.6
+
+WebView {
+ html: "<p>This is a <b>string</b> set on the WebView"
+}
diff --git a/tests/auto/declarative/qfxwebview/tst_qfxwebview.cpp b/tests/auto/declarative/qfxwebview/tst_qfxwebview.cpp
index 9ca6312..a8a0854 100644
--- a/tests/auto/declarative/qfxwebview/tst_qfxwebview.cpp
+++ b/tests/auto/declarative/qfxwebview/tst_qfxwebview.cpp
@@ -55,7 +55,8 @@ public:
tst_qfxwebview() {}
private slots:
- void testBasicProperties();
+ void basicProperties();
+ void setHtml();
void cleanupTestCase();
@@ -102,7 +103,7 @@ void tst_qfxwebview::checkNoErrors(const QmlComponent& component)
QVERIFY(!component.isError());
}
-void tst_qfxwebview::testBasicProperties()
+void tst_qfxwebview::basicProperties()
{
QmlComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/basic.qml"));
checkNoErrors(component);
@@ -138,6 +139,15 @@ void tst_qfxwebview::testBasicProperties()
QVERIFY(!wv->stopAction()->isEnabled());
}
+void tst_qfxwebview::setHtml()
+{
+ QmlComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/sethtml.qml"));
+ checkNoErrors(component);
+ QmlGraphicsWebView *wv = qobject_cast<QmlGraphicsWebView*>(component.create());
+ QVERIFY(wv != 0);
+ QCOMPARE(wv->html(),QString("<html><head></head><body><p>This is a <b>string</b> set on the WebView</p></body></html>"));
+}
+
QTEST_MAIN(tst_qfxwebview)
#include "tst_qfxwebview.moc"