diff options
author | Warwick Allison <warwick.allison@nokia.com> | 2009-10-06 03:33:05 (GMT) |
---|---|---|
committer | Warwick Allison <warwick.allison@nokia.com> | 2009-10-06 03:33:05 (GMT) |
commit | 9d2de4a1aa26b4a19a6ffb4dad7a2d8ad06163d9 (patch) | |
tree | 9ae699994ef1a29550da3ec5c263bef1e0b35eb6 /tests/auto/declarative/qfxwebview | |
parent | e559d97aa8e37c63b9e0090fe5dfa4b9bdeb079e (diff) | |
download | Qt-9d2de4a1aa26b4a19a6ffb4dad7a2d8ad06163d9.zip Qt-9d2de4a1aa26b4a19a6ffb4dad7a2d8ad06163d9.tar.gz Qt-9d2de4a1aa26b4a19a6ffb4dad7a2d8ad06163d9.tar.bz2 |
Test icon() property.
Diffstat (limited to 'tests/auto/declarative/qfxwebview')
-rw-r--r-- | tests/auto/declarative/qfxwebview/data/basic.html | 2 | ||||
-rw-r--r-- | tests/auto/declarative/qfxwebview/data/basic.png | bin | 0 -> 3961 bytes | |||
-rw-r--r-- | tests/auto/declarative/qfxwebview/tst_qfxwebview.cpp | 7 |
3 files changed, 6 insertions, 3 deletions
diff --git a/tests/auto/declarative/qfxwebview/data/basic.html b/tests/auto/declarative/qfxwebview/data/basic.html index 254317c..c262f12 100644 --- a/tests/auto/declarative/qfxwebview/data/basic.html +++ b/tests/auto/declarative/qfxwebview/data/basic.html @@ -1,6 +1,6 @@ <html> <head><title>Basic</title> -<link rel="shortcut icon" type="image/x-icon" href="basic.ico"> +<link rel="icon" sizes="48x48" href="basic.png"> </head> <body leftmargin="0" marginwidth="0"> <table width="123"> diff --git a/tests/auto/declarative/qfxwebview/data/basic.png b/tests/auto/declarative/qfxwebview/data/basic.png Binary files differnew file mode 100644 index 0000000..35717cc --- /dev/null +++ b/tests/auto/declarative/qfxwebview/data/basic.png diff --git a/tests/auto/declarative/qfxwebview/tst_qfxwebview.cpp b/tests/auto/declarative/qfxwebview/tst_qfxwebview.cpp index 834c07f..dc124ce 100644 --- a/tests/auto/declarative/qfxwebview/tst_qfxwebview.cpp +++ b/tests/auto/declarative/qfxwebview/tst_qfxwebview.cpp @@ -72,8 +72,8 @@ void tst_qfxwebview::testBasicProperties() QVERIFY(wv != 0); QTRY_COMPARE(wv->progress(), 1.0); QCOMPARE(wv->title(),QString("Basic")); - wv->icon().save("test.png"); - //QCOMPARE(wv->icon(),QPixmap(SRCDIR "/data/basic.ico")); + QTRY_COMPARE(wv->icon().width(), 48); + QCOMPARE(wv->icon(),QPixmap(SRCDIR "/data/basic.png")); QCOMPARE(wv->statusText(),QString("")); QFile htmlfile(SRCDIR "/data/basic.html"); QVERIFY(htmlfile.open(QIODevice::ReadOnly)); @@ -83,6 +83,9 @@ void tst_qfxwebview::testBasicProperties() expectedhtml.replace(QRegExp("\\s+"),""); QCOMPARE(actualhtml____,expectedhtml); // same, ignoring whitespace QCOMPARE(wv->width(), 123.0); + QCOMPARE(wv->webPageWidth(), 0); + QCOMPARE(wv->preferredWidth(), 0); + QCOMPARE(wv->zoomFactor(), 1.0); QCOMPARE(wv->url(), QUrl::fromLocalFile(SRCDIR "/data/basic.html")); QCOMPARE(wv->status(), QFxWebView::Ready); QVERIFY(wv->reloadAction()); |