summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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"